What's new

Rebuild cru list (can't delete a cron job)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

lost_

New Around Here
I had an errant entry on my crontab because I incorrectly entered the wrong cru syntax. Now I can't delete it with cru -d as it won't take any id I tried with quotes or single quotes.

It's the second line:
Code:
47 15 */7 * * service restart_letsencrypt #LetsEncrypt#
 #45 1 * * 5-6 /jffs/scripts/llbw.sh 1#
6 6 * * * /jffs/scripts/llbw.sh 0 #BW#

Anyway workaround to rebuild the crontab from scratch?
 
Edit /var/spool/cron/crontabs/admin in a text editor.
 
In normal cases yes but when the file is corrupt and/or crond is holding on to it for some reason even a rm -f won't be in effect until either the process dies or the OS reboots.
 
Edit /var/spool/cron/crontabs/admin in a text editor.
Ran into a similar issue today. Thank you for posting this! Saved me a reboot.

PS: for those having trouble to find this file (like I did): "admin" is your username (I changed "admin" to something else some time ago)
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top