Link to home
Start Free TrialLog in
Avatar of Jose Bredariol
Jose BredariolFlag for Brazil

asked on

Cron job

I have to schedule a script to run every day at 00:00 how can I do that ?
Avatar of Kanti Prasad
Kanti Prasad

Hi

yourusername@dev-db$ crontab -e

0 0 *  /your script to run daily at 12 mid night

Below are some examples that will help you to other types of stuff
http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/
Avatar of Seth Simmons
0 0 *  /your script to run daily at 12 mid night

this is incorrect
if you put that line in there, cron will say 'bad month' - "errors in crontab, can't install"
the correct way would be...

0 0 * * * /path-to-script/foo.sh
Avatar of Jose Bredariol

ASKER

One doubt, If i turn the computer off and on again, the cron job will run automatically ?
ASKER CERTIFIED SOLUTION
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks all