Here is what I look at everytime I am writing a new crontab entry:
To start editing from terminal -type:
zee$ crontab -e
what you will add to crontab file:
0 22 * * 0 some-user /opt/somescript/to/run.sh
What it means:
[
+ user => 'some-user',
+ minute => ‘0’, <<= on top of the hour.
+ hour => '22', <<= at 10 PM. Military time.
+ monthday => '*', <<= Every day of the month*
+ month => '*', <<= Every month*
+ weekday => ‘0’, <<= Everyday (0 thru 6) = sunday thru saturday
]
Also, check what shell your machine is running and name the the file accordingly OR it wont execute.
Check the shell with either echo $SHELL
or echo $0
It can be "Bourne shell (sh)
, Bourne again shell (bash)
,Korn shell (ksh)
..etc"