bolsheviks
Manager for workers of Cronjob via REST
This is based on express. It will get the cronjob, add a new one or delete it. Disclaimer: This is just hoby hack, responsibility of the risks held by the user who use this.
Requirement
- Use express
- Have something on crontab
- Node 8 and above (bleeding edge #lit)
npm install bolsheviks
How to use
const express = ;const Bolsheviks = ; const app = ;const port = 8080;const path = "/workers";const worker = path; const router = express;router app;app;app;console;
CURL example
POST
curl -X POST -H 'Content-Type: application/json' -d '{"command": "ls -la", "cron": "0 7 * * *"}' http://localhost:8080/workers
DELETE
curl -X DELETE http://localhost:8080/workers/1