Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Added to the docs, big omission, sorry! http://dcron.io/docs/api/#create-or-update-a-job


Any change that dcron could manage the job scripts itself? I.E. you store the raw command scripts in dcon, then reference them in the create a job endpoint?

For example:

    POST /scripts --data 'node /home/node/myJob.js'
        
That returns a script id { "script_id": "507f1f77bcf86cd799439011" }

Then:

    POST /jobs --data '{
       "name":"cron_job",
       "schedule":"@every 2s",
       "script": "507f1f77bcf86cd799439011",
       "owner":"foo",
       "owner_email":"foo@bar.com"
    }'
This way you don't have to manage/create the scripts on each node manually.


I think you missed the point, jobs are stored in etcd so they're distributed and all dcron (server) nodes will see it. You can even create jobs from any node. Note that, non server nodes doesn't need access to etcd.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: