merari42@lemmy.world to Programmer Humor@programming.dev · 5 months agoWorks if manually restarted by an intern from time to timelemmy.worldimagemessage-square18linkfedilinkarrow-up1453arrow-down13
arrow-up1450arrow-down1imageWorks if manually restarted by an intern from time to timelemmy.worldmerari42@lemmy.world to Programmer Humor@programming.dev · 5 months agomessage-square18linkfedilink
minus-squaredotslashme@infosec.publinkfedilinkEnglisharrow-up22·5 months agoMy current project has a crontab with 216 entries.
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up4·5 months 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-squaredondelelcaro@lemmy.worldlinkfedilinkarrow-up7·5 months agoThat’s why there’s a crontab rule to load the crontab from a file. Cronception if you will.
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up5·5 months agoMake the rule start a secondary cron system. Otherwise it won’t run after you erase the crontab.
minus-squaredondelelcaro@lemmy.worldlinkfedilinkarrow-up3·5 months agoHere you go: with-lock-ex -q /path/to/lockfile sh -c ' while true; do crontab cronfile; sleep 60; done;'
My current project has a crontab with 216 entries.
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…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;'