Email or username:

Password:

Forgot your password?
19 comments
Krutonium

@nixCraft Pro Tip: systemd timers are a treat to use, and I highly recommend using them to retire cron.

Bruce Elrick

@nixCraft
I remember writing short scripts to manage dumping/loading the crontab to/from a source control working copy to track changes and do quick and easy reverting.

This included tagging every line with comments to allow scripts to disable/re-enable different classes of jobs during maintenance windows.

saahbs

@nixCraft have a crontab entry which does: ```crontab -l > ~/backup/crontab``` overnight.

Tertle950

Although it describes the image perfectly well, the alt text does not include the grammatical error I am correcting, making my snide comment inaccessible to the blind.

So, uh...

"crontab -e open cron file for editing"
"crontab -r DESTROY IT UNRECOVERABLY"

Sepi Girardi

@nixCraft This is why I don't back up. Because variety is the spice of life.

T Alex Beamish

@nixCraft My crontab includes a line where it backs itself up twice a day.

I made the -r mistake in the last year. Thank goodness for backups.

Alan

@nixCraft sysadmins would rather destroy their crontab than use systemd timers. ๐Ÿ˜„

Django

@nixCraft Bad mistake - big mistake! What do I see on the bottom left of the keyboard between the 'Fn' and 'Alt' keys? Ei Ei Ei Ei Ei .... ๐Ÿคจ๐Ÿง

MJ

@nixCraft The switch should be something with more friction like a capital D.

hansvschoot

@nixCraft you call it a data loss, I call it spring cleaning. We are not the same.

Markus Peuhkuri

For important cases, my crontabs live in a file under versin control. Then I just I replace it with 'crontab crontab-for-this'.
AFAIK the edit option existed in 4.3 BSD (first time I used cron) but for some reason I opted using file under my home directory. Could be that the default editor was vi (or ed) and using emacs was much easier.
But yes, for odd jobs in random computers I just kick crontab -e.
@nixCraft

Nazo

@nixCraft Just switch to Dvorak. Problem solved. E and R are on opposite sides of the keyboard.

Go Up