pascalw / kindle-dash

Power efficient dashboard for Kindle 4 NT devices
MIT License
1.21k stars 34 forks source link

Cron format has an unusual number of columns #5

Closed coder543 closed 3 years ago

coder543 commented 3 years ago

The example cron schedule is 0 2,32 8-17 * * 2-6, but... this has six columns, where a cron schedule is usually 5 columns.

Plugging this into crontab.guru results in a red mark and no text output.

I think the leading 0 is the issue here. If we erase that, then we get a cron schedule that sounds reasonable for a dashboard.

pascalw commented 3 years ago

Hey @coder543 the cron library I'm using indeed uses a non-standard syntax. I'll make a note of it in the README, or perhaps I'll swap that library for this one which seems to be more standards compliant.

coder543 commented 3 years ago

Ah, ok, that makes sense. Thanks for the explanation!

louis-ad commented 3 years ago

I should've checked here before trying to figure out why my cron syntax kept failing, That cron library won't accept /10 for every 10 minutes, and it seems "0,15,30,45" is 1 item too many in a comma-separated list... quite dumb.

pascalw commented 3 years ago

I swapped out the cron library for another one that's more standards compliant. Now it takes expressions like 2,32 8-17 * * MON-FRI (no more seconds) and */15 8-17 * * MON-FRI. It's in the main branch and I'll make a new release probably later today or tomorrow.

pascalw commented 3 years ago

This is now released in https://github.com/pascalw/kindle-dash/releases/tag/v1.0.0-beta.3.