Shell Script

I need a script that uses the Scheduler mechanism to run a Java file(.class) every 2 hrs.
How do i got abt it.....please help
rahulkothariAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ozoConnect With a Mentor Commented:
crontab -
0 0,2,4,6,8,10,12,14,16,18,20,22 * * * Java file(.class)

 
0
 
rahulkothariAuthor Commented:
what does the *** in crontab -
0 0,2,4,6,8,10,12,14,16,18,20,22 * * * Java file(.class)
represent ?
0
 
akhilesh_chadhaCommented:
yaar rahul *** represents futher numbers ,well from which
colleage r u from kindly contact i nedd someone to work in my company
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
tfewsterCommented:
(from `man crontab`), the 3rd, 4th & 5th fields are:
monthday       The day of the month, 1-31
month          The month of the year, 1-12
weekday        The day of the week, 0-6, 0=Sunday

* is a wildcard, so ths script will execute every day of the month, every month of the year, every day of the week.

Remember to include the full path to the script, and ensure it sets up all the environment variables it needs, as .profile won't get executed..
0
 
rahulkothariAuthor Commented:
akhilesh...gustad20@yahoo.com

thanx guys
0
 
tfewsterCommented:
rahulkothari, please accept ozos comment as an answer to close this question, or post more information if you still need more help...

Thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.