Hacker News new | ask | show | jobs
by stephenr 3137 days ago
You want cron, as a service?

Shit on a stick doesn't anyone actually host anything themselves anymore?

3 comments

I need a scheduler where i can dynamically ( via api ) schedule a job , with the admin UI to manage the jobs .

I Think these are not part of application development and it can be offloaded to hosted services .

There are a lot of frameworks for this in various languages, depends on what you're doing - like sidekiq in ruby and hangfire in dotnet

https://github.com/mperham/sidekiq https://www.hangfire.io/

Jenkins has scheduled jobs and an UI. It can also be accessed via API. https://jenkins.io/
This is not with respect to devops or build .

My app has schedule functionality for example a scheduled report , so if it where like a webhook call then i dont want to waste the cpu cycle ,now i am using quartz scheduler in my java app .

Jenkins isn't just for devops or build.
We do, but it's not sexy, because it just gets the job done and you can't really brag about not having bugs or troubles.
But cron isn't highly available/distributed with consistent state/scheduling
Run cron on all your boxes, have them pull a job at a time from the database. Or shit, go full tilt with a clustered Redis job queue.

All of these are better options than "embed the entire job info in a URL and hand it off to a remote scheduling service".

The user doesn't need a queue though. They just need a process to find posts with a publish date of <= now that aren't published and publish them. That's a one line indempotent sql update statement in any decently architected application.
This was the other part of the comment I replied to:

Run cron on all your boxes, have them pull a job at a time from the database. Or shit, go full tilt with a clustered Redis job queue.

You're solving for the example but the original poster noted multiple jobs.