• Aceticon@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    15 days ago

    The script can be triggered just before and run during the time that’s calculated as the transition from nighttime to daytime.

    If that possibility is not taken in account in the implementation there’s a risk that the cron job is scheduled for a bit under 24h later.

    It’s basically a critical race condition.

    • [object Object]@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      15 days ago

      Eh, if the script always just calculates the sunrise time for the next day and overwrites the cron job, then its runtime shouldn’t matter — unless it gets stuck for 24 hours.