How to limit scheduled Jobs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 05:07 AM
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!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 05:12 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 05:13 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 05:47 AM
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.