Re: MMM-ModuleSceduler- How to schedule for every other week
I’ve been using the very handy scheduling module https://github.com/ianperrin/MMM-ModuleScheduler/ successfully to trigger other modules such as displaying fireworks https://github.com/ChrisF1976/MMM-Fireworks/ on anniversaries by sending notifications to the modules. I’d love to set some more complex schedules like bi-weekly, or odd/even weeks. In theory this can be achieved in the linux crontab by sending an expression such as [ $(expr $(date +%W) % 2) -eq 1 ] that is evaluated before the command is sent.
I’ve tried a few different ways to send this but it looks like the node.js cron does not support this. Wondering if anyone has managed to configure such a setup.
{ notification: 'FireFireFire', schedule: '00 18 * * SUN [ $(expr $(date +%W) % 2) -eq 1 ]', payload: {text: "Its been 2 weeks"}}, // start fireworks 2 weeks on Sunday at 1800
{ notification: 'StopFire', schedule: '30 19 * * SUN [ $(expr $(date +%W) % 2) -eq 1 ]', payload: {text: "StopFire"}}, // stop fireworks at 1930
Thanks in advance.