Nextdoor / ndscheduler

A flexible python library for building your own cron-like system, with REST APIs and a Web UI.
BSD 2-Clause "Simplified" License
1.08k stars 202 forks source link

Adding year so you could run the task once a year #12

Open rolele opened 7 years ago

rolele commented 7 years ago

Great work thanks, I am just wondering how could I use ndscheduler to run task only once. I think adding the year option could be a way to say run the task on that particular date and thats it.

Ok maybe providing a mecanism to delete the job just after it has been triggered. Is that possible? How would I do that?

wenbinf commented 7 years ago

You can pause a job, so it won't run automatically; and then you manually trigger it by click the "Custom run" button.

0-v7wv--rzcgevnya1

rolele commented 7 years ago

ok but how do I pause a job automatically after it has been fired and without clicking manually

wenbinf commented 7 years ago

By "pause a job", I mean "a job can't be scheduled to run". If a job is already fired, then there's not way to "pause" it.

(Sorry for late reply! )

sabw8217 commented 5 years ago

You can use the API to delete a job from the job if you want, just send a DELETE request to /api/v1/jobs/{job_id}.

Supporting something running once a year seems reasonable though, although not really a priority for me. Leaving it open as an enhancement.