Cron uses a text file to schedule tasks based on 6 parameters separated by spaces.
Parameters
1 the minute you want the script to run (0-59) or * for every minute
2 The hour you want (0-23) or * for every hour
3 The day of the month (0-31) or *
4 The month (1-12) or *
5 The day of the week (0-6) or * 0=sunday
6 The script (and any parameters) you want to run
You can make a backup copy of your crontab file by running:
crontab -l > /usr/cron_save
Then edit by running:
crontab -e
Insert a line, and add your command to run every 24 hours
Code:
# Comment for my script
00 12 * * * /usr/local/myscript > /tmp/myscript.log 2>&1
This would run /usr/local/myscript every day at 12:00 and create a log of the latest result in /tmp/myscript.log
If you need to restore your original crontab file then run:
crontab /usr/cron_save