If you would like to set up a one-time cronjob, i.e. cronjob that runs at a specific time once and never repeats, you can follow these instructions:
- Click Add a cron job or Edit existing cronjob
- Enter URL to your cron script.
- Enter desired time into Time Pattern field, e.g. Feb 14, 2019, 7:30
- Make sure you select correct Timezone
- Click Save changes.
And that's it. You can click on the time pattern field e.g. Feb 14, 2019, 7:30 in the example above, and it'll show the next execution time so you can confirm the time settings are correct.
Comments
4 comments
awesome
Can this be done, but from the API (cron.add) ???
Can this be done, but from the API (cron.add) ???
Same question here!
And a new one: It is possible that one time cron jobs will automatically delete after execution?
Thanks!
Sorry for being late.
Yes, you can use cron.add API function and set the expression like this
https://www.setcronjob.com/api/cron.add?token=***&url=example.com/cron&expression=Sep 20, 2019, 8:30
For automatically deleting one-time cronjobs, see
https://blog.setcronjob.com/2018/09/auto-delete-one-time-cronjobs.html
I hope this helps.
Please sign in to leave a comment.