How to undo a cronjob

Suspense    Sep 13 1:54AM 2017

Hi,

I set up a cronjob last night to run some backups, however cronjob commands aint detected by the system running esxi, so im unsure how to remove the cronjob i did.

The root cronjob file is read only and not supposed to be edited, any advice on how to remove the cronjob?

Regards


Suspense    Sep 13 4:35AM 2017

This has been resolved


gchen    Sep 13 10:16AM 2017

(I'm going to respond anyway in case someone else runs into the same issue).

/var/spool/cron/crontabs/root is readonly but you can still edit it as root.

If the cronjob was created using the vertical cron command, you can remove it with vertical cron disable.

If you created the cronjob manually, you can edit the root cronjob file to remove it, but also remember that that file will be wiped out after a reboot, so you need to modify /etc/rc.local.d/local.sh to regenerate it (the vertical cron command does this automatically).

Also, after you modify /var/spool/cron/crontabs/root you need to run /bin/busybox crond for the changes to take effect.


Log in to comment
Copyright © Acrosync LLC 2017