Show HN: Cronbeats – Cronjob as a Service
cronbeats.com
cronbeats.com
I wouldn’t use a cron service because of the security problems. cron running locally means I can protect the scripts from getting executed when I don’t want them run. If this service can send requests to run scripts anyone can send the same request.
With cloud hosting at $5/mo with shell access any developer who doesn’t have access to their crontabs should fix that problem.
The guy(s) at https://healthchecks.io/ do the job of monitoring the job completion but do not trigger the job itself. I'm looking to see if someone has both the needs (to start the job, and to check its completion)..
> If this service can send requests to run scripts anyone can send the same request.
I thought of that. A easy fix would be to send a token in the url query, and validate that token in the user's webapp's view..
Thanks for the feedback!
Implementing retries, timeouts, etc. for jobs you initiate remotely over HTTP GET requests, and using a token for validating access, seems like a lot more integration at the customer side than just using cron.
Enforcing timeouts, or preventing them, means changing the web server (Apache) and runtime system (e.g. mod_php) to allow a process to run for longer than the default time. If I have access to Apache and PHP config I also have access to the crontab.
I use cron with HTTP GET requests locally, run with curl so I can set a timeout and capture the output. Apache restricts those requests to localhost, so they can't get initiated remotely. I have a simple wrapper that logs when jobs start and finish, and a monitoring page that shows last run time and success/fail status. Every job has an associated estimated time it should run so the monitor can show jobs that ran too long.
This is currently very bare-bones but I'm publishing it here just to see if people are interested in something like this.
I guess this kind of services may be useful for developers which do not have access to system crontabs but still want to periodically run some tasks (which they can program to be ran from a URL endpoint which cronbeats will send a GET request to), like doing db backups, sending emails, clean the database, etc.
I have a free version which allows users to create 10 cronbeats, but if it finds interest, I'll find motivation to build the code to the "pro" versions..