Pop quiz (because I'm trying to solve this problem):How would you schedule a job to run at sunrise? Or at sunset?The problem, of course, being that "sunrise" and "sunset" are moving targets. Different each day by a few minutes.How would you solve this?#FreeBSD #Linux #cron #popquiz #programming

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 week ago

@ermo @BastilleBSDYou can use the at(1) command to run something once, with no cleanup needed. Run a crontab entry after midnight to schedule two at commands for the day.Install at if it's not there. It's a small package.

  • source
  • parent