Add job to the crontab
I have some 26 scripts which has to run in specific intervals. I know using crontab i can schedule jobs but I am not aware of how to add this to the crontab.
Please tell me to add an entry in the crontab file.
crontab accepts entry only in a specific format as below:
minute hour day month week command or script
1. Open crontab in VI editor by below command:
2. In the editing mode (i), add all your 26 scripts as mentioned in the above format. One script per line.
3. Save the changes: Esc key and :wq which will update the changes and quit from the VI editor.
Now you have all your entries in the crontab.
View your crontab jobs by below command:
Create a file and add all the entries in that file. Execute the below command to add the entries from the file to crontab.
Even your crontab list is lost, you have the cronfile and you can add it to crontab at anytime.
Read this to sync crontab and cronfile: https://spytm.com/questions/topic/how-to-load-crontab-from-a-file/