But certainly a cron job + python script would work too!
Just to further this thought a bit… Drupal provides a hook_cron() that can be used to run PHP code on a regular basis within a Drupal module. So if you are experimenting with custom farmOS modules at all that could be useful. Here is the documentation for that in api.drupal.org: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_cron/7.x
Of course, the prerequisite to that is setting up your normal system cron to run Drupal’s cron. Setup instructions for that are here: https://www.drupal.org/docs/7/setting-up-cron