MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. elentophanes
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 0

    Posts

    Recent Best Controversial
    • MMM-ModuleScheduler: How to schedule for every other week

      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.

      posted in Requests cron schedule notifications
      E
      elentophanes
    • 1 / 1