Using cron4j, one can set up a job to run in some time in a future
Scheduler s = new Scheduler();
s.schedule("5 10 * * *", job);
s.start();
Using cron4j, can the job be scheduled to start “next Saturday”, or on “12/21/2012”?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. For example:
This says run this at 12:00 AM on December 21st.
The Chron syntax does not finitely support a year setting, but if you set this job today, it would run the next time it crosses that date.
Note: The other answer suggests adding a year column. If you do include this, the behavior is not entirely predictable — it depends which chron implementation you’re using.