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 shou…
Show HN: Lightweight job scheduling for Node.js
11–17 of 17 posts
Re: Show HN: Lightweight job scheduling for Node.js
#12If 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 shou…
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.
Re: Show HN: Lightweight job scheduling for Node.js
#13Re: Show HN: Lightweight job scheduling for Node.js
#14Curious, why the choice of mongo vs something like redis?
The choice of Mongo vs Redis was intentional. Without configuration Redis doesn't guarantee persistence as well as Mongo. Since Redis is often used for non-critical data such as sessions I didn't want to enforce sacrificing performance of sessions for persistence.
I mean, if you're worried about cluster workers file reading being slower than a db connection, the json store could be write-only most of the time and only read on app startup while schedules are synced over cluster messaging.
Re: Show HN: Lightweight job scheduling for Node.js
#15Any word on how this affects battery life, specifically on Macs? I've had to turn on atrun on my MacBook Air and it has absolutely destroyed my battery life.
Re: Show HN: Lightweight job scheduling for Node.js
#16Earlier quoted context omitted.
The choice of Mongo vs Redis was intentional. Without configuration Redis doesn't guarantee persistence as well as Mongo. Since Redis is often used for non-critical data such as sessions I didn't want to enforce sacrificing performance of sessions for persistence.
Looking at these scheduling modules, I wonder to myself why saving a .json file wouldn't be more simple. Filesystem cache, available to all workers on the system and no dependencies required. I mean, if you're worried about cluster workers file reading being slower than a db connection, the json store could be write-only most of the time and only read on app startup while schedules are synced over cluster messaging.
Re: Show HN: Lightweight job scheduling for Node.js
#17Earlier quoted context omitted.
Looking at these scheduling modules, I wonder to myself why saving a .json file wouldn't be more simple. Filesystem cache, available to all workers on the system and no dependencies required. I mean, if you're worried about cluster workers file reading being slower than a db connection, the json store could be write-only most of the time and only read on app startup while schedules are synced over cluster messaging.
In my mind there are a few reasons, but indeed it could definitely be implemented with a flat file. Sometimes you aren't guaranteed write-access to a file on the system, especially if you're using a PAAS like Heroku. That also complicates things if you want to build something to view/edit the data in an isolated instance. These are just the reasons that come to the top of my head, but in reality you're right, this co…