You are Here:   FAQ->Scripting & Programming->Cron Jobs->Article #4


How can I remove/delete a Cron Job?


For Linux packages with SSH access only!Linux Packages with SSH Access Only!
      This includes:
arrow 1&1 Business Pro (Linux) arrow 1&1 Dual Standard (Linux)
arrow 1&1 Professional (Linux) arrow 1&1 Dual Unlimited (Linux)
arrow 1&1 Managed Servers arrow 1&1 Dual Business (Linux)
      This DOES NOT include:
not 1&1 Beginner not 1&1 Business (Linux)
not 1&1 Home (Linux)




There are really three options when removing Cron Jobs. The first is that the entire Crontab can be deleted will will erase all Cron Jobs. The second is that the Crontab can be edited to remove the line that contains the Cron Job. The third option is editing the Crontab to comment out the line that contains the Cron Job, leaving the Cron Job there for use later if necessary.

Regardless of the option chosen, SSH access is required. Please log into your webspace via SSH. For more help, please reference How do I connect to my webspace via SSH? or How do I connect to my webspace via SSH on a Mac?




Deleting or disabling a specific Cron Job
To delete or comment out a Cron Job from the Crontab, simply type crontab -e to edit the Crontab. To exit the Crontab at any time (in case a mistake is made) simply press the Esc key and then type :q! and press ENTER to quit without(!) saving.

delCron1.png

Once the Crontab has been opened using the VI editor, use your arrow keys to place the cursor at the beginning of the Cron Job line that is to be deleted or commented out. To insert the hash symbol(#) so that the line is commented, press the i key to insert text and then add the hash symbol to the very beginning of the line.

newCron16.png

Or to delete a Cron Job from the Crontab altogether, make sure that the cursor is at the very beginning of the Cron Job line that is to be removed and press the 'd' key twice ('dd'). This should remove the entire line.

delCron2.png

To save your changes, press the Esc key and then type :x and press ENTER to exit and save changes.

delCron3.png

The Crontab should update.
delCron4.png

Next, check the Crontab by typing crontab -l and pressing ENTER to list the Crontab. The line(s) removed should no longer be listed in the Crontab.

delCron5.png




Deleting all Cron Jobs within the Crontab
To delete the entire Crontab simply type crontab -r and press ENTER to remove or delete the entire Crontab.

rmCron1.png

Next, type crontab -l to list the crontab and verify that all Cron Jobs have been removed.

rmCron2.png




Print Article
How useful was this article?
(From 5 = Very Useful to 1 = Not Very Useful at all):
1 2 3 4 5