Set Cron Job - Scheduler

Forum to discuss the Web client version of Servoy.

Set Cron Job - Scheduler

Postby ayadav1 » Sun Jun 04, 2017 1:57 pm

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
ayadav1
 
Posts: 21
Joined: Thu Oct 20, 2016 2:40 pm

Re: Set Cron Job - Scheduler

Postby ROCLASI » Sun Jun 04, 2017 4:09 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Set Cron Job - Scheduler

Postby jeffrey.vandenhondel » Wed Jul 26, 2017 11:31 am

And if you want a easy generator for these cron jobs use this.
jeffrey.vandenhondel
 
Posts: 36
Joined: Thu Jul 28, 2016 9:05 am


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 4 guests