[GTALUG] Crontab versioning

Jamon Camisso jamon.camisso at utoronto.ca
Fri May 4 08:11:59 EDT 2018


On 2018-05-03 10:44 AM, Alex Beamish via talk wrote:
> I'm developing scripts that get run by crontab, so I'm in there making
> updates fairly regularly. I would love to be able to document the changes,
> so I'm wondering if there a usual and customary technique to version
> crontabs?

What are you changing in crontabs so much that you need versioning?
Shouldn't all the logic be in your scripts? Maybe I'm missing something,
but it seems like needless complication to me.

> Ideally there would be some sort of hook around 'crontab -e', but failing
> that, I'd have the output of 'crontab -l' (run regularly by cron?) go to a
> versioned file. Plan B sounds a bit hokey to me.
If you do need to version things, you can just chuck a git repo under
/var/spool/cron/crontabs and ignore any files there you don't want tracked.

Cheers, Jamon


More information about the talk mailing list