merari42@lemmy.world to Programmer Humor@programming.dev · 22 hours agoWorks if manually restarted by an intern from time to timelemmy.worldimagemessage-square56linkfedilinkarrow-up1614arrow-down14
arrow-up1610arrow-down1imageWorks if manually restarted by an intern from time to timelemmy.worldmerari42@lemmy.world to Programmer Humor@programming.dev · 22 hours agomessage-square56linkfedilink
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up5·14 hours agoAt some point it may be good to migrate to airflow or something similar. It’s not the number of entries that makes it bad. It’s the fact that if you run crontab, they are gone…
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up8·edit-212 hours agoAt first I thought you missed the -r. Then I checked. Defaulting to STDIN here is very, very dumb, IMHO. Almost as bad as putting the “edit” flag right next to the “delete everything without confirmation” flag on a Western keyboard (-e vs -r).
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up7·12 hours agoCrontab is a really badly designed program that we just can’t fix because everybody depends on its WFTs for something.
minus-squaredondelelcaro@lemmy.worldlinkfedilinkarrow-up9·14 hours agoThat’s why there’s a crontab rule to load the crontab from a file. Cronception if you will.
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up7·14 hours agoMake the rule start a secondary cron system. Otherwise it won’t run after you erase the crontab.
minus-squaredondelelcaro@lemmy.worldlinkfedilinkarrow-up6·edit-213 hours agoHere you go: with-lock-ex -q /path/to/lockfile sh -c ' while true; do crontab cronfile; sleep 60; done;'
At some point it may be good to migrate to airflow or something similar.
It’s not the number of entries that makes it bad. It’s the fact that if you run
crontab
, they are gone…At first I thought you missed the
-r
. Then I checked. Defaulting to STDIN here is very, very dumb, IMHO. Almost as bad as putting the “edit” flag right next to the “delete everything without confirmation” flag on a Western keyboard (-e
vs-r
).Crontab is a really badly designed program that we just can’t fix because everybody depends on its WFTs for something.
That’s why there’s a crontab rule to load the crontab from a file. Cronception if you will.
Make the rule start a secondary cron system. Otherwise it won’t run after you erase the crontab.
Here you go:
with-lock-ex -q /path/to/lockfile sh -c ' while true; do crontab cronfile; sleep 60; done;'