1
votes

I am trying to run a method every 10 minutes for the next 3 days and only that.

I have tried this :

cron.expression=0 */10 * * * ?

This will run every 10 minutes every day, every month.

But I only want it to be limited to the next 3 days starting from NOW.

I just can't find how to use (now -> 3 days) in cron

I am using this website and Spring scheduler Spring scheduler doc without success

1
How do you define 'the next 3 days'? Is it going to be 'the next 3 days' every time you restart your application/server? or only one SINGLE time from today? - developer

1 Answers

0
votes

Based on the Spring specs you can't define this logic directly in to the cron record. You should add such logic in to the program you run with this cron