Trigger Business Rule from Scheduled Job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2012 09:29 PM
Hi All
I would like to know how to trigger a business rule from a scheduled job
i have a business rule which triggers email notifications on knowledge expiration
it says ( in the comment ) its triggered from a schedules job but am not able to figure out the job
any help would be appreciated
Regards,
Ravi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2012 02:36 AM
You can see an example of this in the 'Autoclose Incidents' scheduled job. Navigate to 'System Scheduler -> Scheduled Jobs' to see it. The key is calling the business rule ('incident autoclose' in this case) by name in the 'Job context' field like this...
fcScriptName=incident autoclose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2012 03:20 PM
Mark, I'm assuming that today, if we were to create something like the "incident autoclose" BR, it would be wiser to create a Scheduled Script Execution and either put the code directly in there, or create the code as a Script Include and call it from the Scheduled Script Execution instead of doing it as a BR???
I looks like it was basically jerry-rigged to work because at the time that was the only way to do it, but today we have a more mature product to work with. I like to think of BRs as database triggers and Script Includes as stored procedures, and that whole "incident autoclose" solution does not fit into my definition here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2012 03:32 PM
You assume correctly and I completely agree. Better just to create a scheduled script execution IMHO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2015 02:46 PM
Hi Jim,
I have a business rule that runs against a custom table that I am triggering from a Scheduled Job. If this isn't a good technique then I am considering going with a Scheduled Script Execution.
However, since Script includes and Scheduled Script Executions seem to be global, how would I write code to run only on that one specific table? My business rule that I want to trigger on a schedule is running on my custom table, and that's important since I need to access variables in that table to perform actions in the business rule.
How would I structure the script section of the Scheduled Script Execution or a Script Include such that it runs on that custom table only?
Thanks!