Hacker News new | ask | show | jobs
by bunkat 4611 days ago
If you wanted even more flexible schedules, you might want to look into Later.js (http://bunkat.github.io/later/), a small library I created just for this purpose. It supports composite and exception schedules, cron schedules, and lots of different time periods. Everything can be specified using an API or using English text.

I also built replacements for setTimeout and setInterval to use Later schedules, so it should be easy enough to plug it into your solution.

1 comments

Very cool. How robust is the english parsing? For example, would it understand something like "The first wednesday of every month"? Either way I will definitely check it out.
You can see the grammar and lots of examples at http://bunkat.github.io/later/parsers.html#text. For your question, it would be 'on Wednesday on the first day instance every 1 month' or 'on the first day instance on Wed' would also work.