Home Forums Unix & Linux How to add job to the crontab?


  • Author
  • admin
    Post count: 111

    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.

  • admin
    Post count: 111

    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:

    crontan -e

    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:

    crontab -l

    Good Luck.

  • Anonymous
    Post count: 22

    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://www.spytm.com/questions/topic/how-to-load-crontab-from-a-file/

Reply To: How to add job to the crontab?
Your information: