How to create a Job using the API that will run only one specific date? #188
Unanswered
rafaelsanchezrd
asked this question in
Q&A
Replies: 2 comments 5 replies
-
I did something like . while creating the cron Job; you can set a start date and end date in your database Check the start date and end date anytime the cron job runs If the start date matches the date you want then proceed with your code , after then delete the cron job. I hope this illustration is clear |
Beta Was this translation helpful? Give feedback.
3 replies
-
You can now set an expiry date for your schedule. This should enable you to ensure that the job runs only once (i.e. let it expire immediately after its scheduled first run date). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm really impressed by this amazing tool and feel grateful that I discovered it!
I'm currently attempting to use the API to create a Job that will only run once, on a specific date. So far, I've managed to create a Job using the API and here's the payload that I'm sending to the endpoint:
{ "job": { "url": "https://example.com", "enabled": "true", "saveResponses": true, "title": "Job Feb", "schedule": { "timezone": "Europe/Berlin", "hours": [0], "mdays": [24], "minutes": [0], "months": [2], "wdays": [-1] } } }
I'm wondering what steps I should take to ensure that the job runs only once, on a specific date - say, May 31st, 2023. I would greatly appreciate any help or advice on this matter.
Beta Was this translation helpful? Give feedback.
All reactions