There were several posts regarding the requirement of schedule execution of a custom script in IFS. There could be several ways of doing this and this topic explains how to build a common solution using Events and Scheduled Tasks.
IFS has two event types, Application Defined and Custom defined. Custom defined events are based on triggers and can be created from IFS Solution Manager. Application defined events are created via script and the triggering of the event is done inside the PLSQL logic.
Step1: Create Application Defined Event and action
Deploy following code in database using AppOwner. Check the attachment for detailed script.
BEGIN
Event_SYS.Enable_Event('Event', 'C_SEND_DOC_REV',
'Send Document revision',
'DUMMY/STRING^');
END;
Navigate to the Events and search for the event ID.
RMB on the event, Create new action
Choose the Action Type SQL and write your code to execute on a schedule.
Step 2: Create the Scheduled Task
Navigate to New Database Task window and create a new database task for Event_Sys.Event_Execute method, Save
Create a new Scheduled task. Fill the event LU and event ID which is we created in step 1. Schedule it as per your requirement.
That's basically all you need to schedule your custom script!
this topic if you think it’s useful and comment any other ‘hacks’ or suggestions.
Cheers!