Hi,
I want to set a Cron job in my application to execute 1 specific method to update the database value.
I have checked the Servoy wiki and found that we can set a Cron job using addCron method.
But after implementation I have found that method is being executed only once.
I want to set Cron for every 5 mins. Please share the syntax to add Cron job.
And I want to run without client login.
Thanks in advance.
Abhishek
Hi Abishek,
Cron uses a specific format to define when a job should run (seconds, minutes, hours, day of month, month, day of week, year). It’s very versatile which also makes a bit complex.
To run a job every 5 minutes you use the time-string “0 0/5 * * * ?” (0 seconds, every 5 minutes starting from the top of the hour).
You can read more about it here.
Hope this helps.
And if you want a easy generator for these cron jobs use this.