merari42@lemmy.world to Programmer Humor@programming.dev · 3 months agoWorks if manually restarted by an intern from time to timelemmy.worldimagemessage-square30fedilinkarrow-up1548arrow-down15
arrow-up1543arrow-down1imageWorks if manually restarted by an intern from time to timelemmy.worldmerari42@lemmy.world to Programmer Humor@programming.dev · 3 months agomessage-square30fedilink
minus-squaredotslashme@infosec.publinkfedilinkEnglisharrow-up23·3 months agoMy current project has a crontab with 216 entries.
minus-squarepinball_wizard@lemmy.ziplinkfedilinkarrow-up26·3 months agoWell, here’s a sentence I haven’t been tempted to use before: “I believe that may be too many crontab entries.”
minus-squareDickFiasco@sh.itjust.workslinkfedilinkarrow-up15·3 months agoAny problem in server administration can be solved with an additional crontab entry. Except for the problem of too many crontab entries.
minus-squarerumba@lemmy.ziplinkfedilinkEnglisharrow-up2·3 months agopshaw, just drop in there and combine a few /etc/cron.d/first25 /etc/cron.d/second25 …
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up4·3 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·3 months agoThat’s why there’s a crontab rule to load the crontab from a file. Cronception if you will.
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up6·3 months agoMake the rule start a secondary cron system. Otherwise it won’t run after you erase the crontab.
minus-squaredondelelcaro@lemmy.worldlinkfedilinkarrow-up5·edit-23 months agoHere you go: with-lock-ex -q /path/to/lockfile sh -c ' while true; do crontab cronfile; sleep 60; done;'
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up6·edit-23 months 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-up6·3 months agoCrontab is a really badly designed program that we just can’t fix because everybody depends on its WFTs for something.
My current project has a crontab with 216 entries.
Well, here’s a sentence I haven’t been tempted to use before:
“I believe that may be too many crontab entries.”
Any problem in server administration can be solved with an additional crontab entry. Except for the problem of too many crontab entries.
pshaw, just drop in there and combine a few
/etc/cron.d/first25 /etc/cron.d/second25 …
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;'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 (-evs-r).Crontab is a really badly designed program that we just can’t fix because everybody depends on its WFTs for something.