How to limit scheduled Jobs

bschulz88
Tera Contributor

Hi,

i have a scheduled job running every 10 minutes to check on a flag and then update some data.

Is it possible to limit this scheduled job (lets say just 100 times a day)?

The scheduled job will run every 10 minutes but dont update these data, if a counter reaches the 100.

Thanks!

3 REPLIES 3

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

If you are running it periodically then there is no way you can limit it to trigger for that times only. But we can do conditional coding.

 

You will have to do conditional coding for it where you have to check in sys trigger table if it has triggered that many times or not.


Thanks,
Ashutosh

Matthew Smith
Kilo Sage

What is the reason for limiting the Scheduled Job? 

To me it would make more sense to just run the job every 15 mins instead of 10. Then it will only run 96 times per day.

Thanks
Matt

The reason is that i want to use google maps api to get longitude and latitude from address data of cmn_location. there is a standard plugin that contains a async business rule if addressed will be changed and dont have location data. this business rule creates a record in sys_geocoding_request table.

the scheduler runs every 10 minutes and run for every record in sys_geocoding_request table to create the latitude and longitude.

because of cost limitation, i just want to process 500 requests a day.