Warning: The magic method MchGdbcBasePublicPlugin::__wakeup() must have public visibility in /data/web/virtuals/50643/virtual/www/subdom/wp/wp-content/plugins/goodbye-captcha/includes/plugin/MchGdbcBasePublicPlugin.php on line 44 PinePhone Daily Cron Fixed – Dejvino's notebook
Brainwaves Linux

PinePhone Daily Cron Fixed

I needed to run a daily cron job on my PinePhone, but that turned out to be trickier than expected. How can you schedule a job to be run in the morning, when the phone is most likely asleep (suspended) at that time?

My solution (workaround?) was to have the cron job run every 10 minutes, checking if the job was already executed today and if not, run the actual job command. This check is pretty cheap and I don’t need to wake the phone up to run my job. All I need is to get the job executed “today, whenever you have the time”.

The Cron Limiter tool (crolim for short) is available in my snippets repository.

With this tool, the crontab is as easy as: */10 * * * * crolim podget. Now my daily podcasts can be downloaded daily, when the phone is awake.


Leave a Reply

Your email address will not be published.