I’m just guessing, but it might be easier to programmatically install a systemd cron job (and making sure it runs) than doing so for the old/conventional crond?
* Not running if the network is down.
* Not running if the download path isn't available.
* Running if the machine was off during the scheduled time.
* Monitoring and retry logic.
* Logging to syslog.
* Resource constraints.
* Random wait.
It ends up being a lot of code factored out of the actual application.
Yes, obviously cron would work. If systemd can do what this dev needs, what's the harm?
Along similar lines, I think I heard that 30% of detected malware was signed with a “trusted” authority last year.
Modifying system hosts configuration requires privileged file system access.
The mindset here should be default deny.
With the proper permissions something like this should be ok, but I'd tread lightly. Especially with something that dynamically updates your hosts file.
Naturally it's on the user to properly configure the permissions.
I'm not saying this isn't a worthy project, I'm just adding to the discussion on why people should be cautious when running scripts with root permissions.
1. What is so bad about python in specific?
2. If you worry about root privileges, required for modifying the host file, you can use app armor to put the thing on a leash