• pinball_wizard@lemmy.zip
      link
      fedilink
      arrow-up
      33
      ·
      20 hours ago

      Well, here’s a sentence I haven’t been tempted to use before:

      “I believe that may be too many crontab entries.”

      • DickFiasco@sh.itjust.works
        link
        fedilink
        arrow-up
        17
        ·
        20 hours ago

        Any problem in server administration can be solved with an additional crontab entry. Except for the problem of too many crontab entries.

        • Opisek@piefed.blahaj.zone
          link
          fedilink
          English
          arrow-up
          8
          ·
          edit-2
          16 hours ago

          And that’s why I added a crontab entry that periodically purges my cron configuration. That way, I’m forced to readd only the truly necessary cron jobs, successfully reducing the amount of crontab entries.

      • rumba@lemmy.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        20 hours ago

        pshaw, just drop in there and combine a few

        /etc/cron.d/first25 /etc/cron.d/second25 …

        • j_z@feddit.nu
          link
          fedilink
          arrow-up
          1
          ·
          12 hours ago

          This is the way. Exactly what we did + migrated 80% of everything to k8s cronjobs and Argo workflows

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      18 hours ago

      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…

      • bleistift2@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        16 hours ago

        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).

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          7
          ·
          15 hours ago

          Crontab is a really badly designed program that we just can’t fix because everybody depends on its WFTs for something.

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          7
          ·
          17 hours ago

          Make the rule start a secondary cron system. Otherwise it won’t run after you erase the crontab.

          • dondelelcaro@lemmy.world
            link
            fedilink
            arrow-up
            6
            ·
            edit-2
            16 hours ago

            Here you go:

            with-lock-ex -q /path/to/lockfile sh -c '
            while true; do
                crontab cronfile;
                sleep 60;
            done;'