Issue
What I tried:
@Scheduled(cron="* * * 08 04 2099")
I want cron expression that never executes.can any one help me with the expression.
Thanks in advance...!
Solution
This cron will run every minute and task will be bound with condition. If you need different cron job then you can generate using this website.
@Scheduled(cron = "0 0/1 * 1/1 * ? *")
protected void performTask() {
if (condition)//if value matches with database value
{
//perform the task
}
}
Answered By - Muhammad Waqas Dilawar