Hacker News new | ask | show | jobs
by remram 1695 days ago
You can still run whatever business logic from cron to decide whether you took the day off or you have the resources to open. Offloading the timezone logic to cron still makes sense, since running tasks at the right time is exactly what it's for.
1 comments

It's really about trading off something I understand fairly well (a script I wrote) and something I have questions about. Since it's not a particularly important problem and I'm more likely to make errors in cron, I'd rather have everything visible in a self-contained script.

For something important, I would look at it completely differently by testing it:

- What happens if I have a scheduled cronjob running every day at a certain time, but I want to override it for one specific day and have that job run later? (e.g. how is it accomplished so that I can maintain the default behavior while overriding and opening later on specific days)

- How can I make different commands run in different timezones? (as it stands now I find conflicting information about this)

- What happens if my machine lost power when the job needed to run? (it looks like it just never runs the script)

- Can I input a specific time and test if cron will set open for that specific time? (this doesn't seem possible)