firstandthird / hapi-agenda

5 stars 3 forks source link

Feature/refactor every conf #20

Closed ecwillis closed 9 years ago

ecwillis commented 9 years ago

Major update (breaking change)

Refactored configuration to accept params for every as follows:

jobs:
  processEvery: '30 seconds'
  every:
    'csv-report':
        interval: '0 45 23 * * 6'
    'enable-cse-libraries': '6 hours'
    'circle-reminders':
       interval: '0 0 7 * * 4'
       enable: false
    'chapter-reminders':
       interval: '0 15 7 * * 4'

Where setting enable: false will call agenda.cancel to remove the job from the queue and stop it.

jgallen23 commented 9 years ago

Looks great. Just put { on the line before

jgallen23 commented 9 years ago

Does cancel remove from db?

ecwillis commented 9 years ago

Yep. It's a weird name but that is what it does.

jgallen23 commented 9 years ago

added in 0.9.0