Welcome to WebmasterWorld Guest from 18.208.159.25

Forum Moderators: bakedjake

Message Too Old, No Replies

Cron tab

How to set cron tab

     
11:25 am on Jun 25, 2007 (gmt 0)

New User

10+ Year Member

joined:June 25, 2007
posts:1
votes: 0


Hi All,

I am having one file called mirrorstatus.jar file .

now i want to run this file every hour daily.

please tell me where i should put this file in my linux machine.
and tell me how to set the cron tab for this file..

please give me the full steps if possible, i am very new for this shell scripting..

please help me

thanks in advance

Thanks,
Prakash

12:46 pm on June 25, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11842
votes: 242


welcome to WebmasterWorld, prakash!

type "crontab -e" to edit (add cron commands to) your existing cron table.
or type "crontab /path/to/file" to install commands from an existing file to your cron table.

the column format of cron commands is:
minute hour mday month wday command

a "*" in a column means run the command every occurrence of that period.

1:46 pm on June 25, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 27, 2001
posts:2548
votes: 0


Welcome Prakash!

It's hard to give precise instructions without knowing all the details. In any case with something like crontab you will want to learn enough to be able to fix issues that might occur. The easiest way to get at the syntax is to type:

man 5 crontab

Remember to use absolute paths in crontab as your .bashrc file is not loaded.