What are some significant differences to expect when switching to an alternative, and can that affect gaming compatibility and performance?

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

    I think if you know cron from the start it can be easier, but it gets really annoying really fast.

    Compare:

    0 0 * * * /usr/bin/flock -n /tmp/myjob.lock bash -c 'sleep $((RANDOM % 3600)) && /usr/local/bin/myjob.sh'
    

    To:

    [Timer]
    OnCalendar=daily
    RandomizedDelaySec=1h
    

    That and things like systemd preventing overlapped delays, handing what to do if the system was down during the last cycle, built in logging and event tracking. Seeing successful vs non successful runs etc.

    Once you add in those production requirements cron gets annoying fast and timers are easy.

    • KeithD@lemmy.nz
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      For adding a quick thing to make something happen at a specific time, I can add a cron job in a couple of minutes. To add a timer takes creating a couple of files with syntax that took me a while to look up last time I needed it, and running a command. Then debugging. Sure, the timer has benefits, but cron jobs are still simpler.

      On the bright side, there’s actually a “crontab -t” command that apparently can be used to generate timer files from a crontab line, which I hadn’t known of before today.

      • mholiv@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        27 minutes ago

        That’s because you know cron. If you knew timers equally as well they would be easier. And they let you handle the edge cases (retry, randomness, tracking, logs etc) without the need for a custom script.

        Once you factor in the production edge cases I think timers are clearly easier. You get all of it for free.

      • Eggymatrix@sh.itjust.works
        link
        fedilink
        arrow-up
        4
        ·
        60 minutes ago

        I can add the two files required to run a timer in systemd in a couple minutes, but writing the complex incantation to cron for having it do something that is the default in systemd is pure pain and takes me 3 hours of googling