Hello,
Can anyone help me how to set any script as cron job. I have gone through all threads but not able to get the details. Appreciate your help.
I need to set test.pl to run on every Tuesday by 6am in the morning.
I do not the cron file which is defined.
Please help me out.
Thanks
Have a read of cron and crontab .
hi jam
crontab hav 6 fields
min hour day month weekday <filename>
minute Minute of the hour 0 to 59
hour Hour of the day 0 to 23
day Day of the month 1 to 31
month Month of the year 1 to 12
weekday Day of the week 0 to 6 (0 = Sunday)
use this one
00 06 * *
STOIE
July 28, 2010, 4:13am
4
00 06 * * 2 test.pl
You just have to add this to your users cron using...
crontab -e
Actually: might want to declare where perl is...
run a:
which perl
That will show you where perl lives..
ie. /usr/bin/perl
Then make the crontab appropriately:
00 06 * * 2 /usr/bin/perl /path/to/test.pl