Triggering Opalis Workflows Using Complex Schedules

I answered my first Opalis question in the forums today. And sure enough, it’s something that would make a good article. The reason is because in describing Opalis workflows, sometimes it’s helpful to see an actual picture of the workflow and how it’s created. You just can’t insert pictures (easily) in the forum posts. So, I thought I’d use this article to provide more detail.

Here’s the scenario: You have a script that needs to run on your computer(s) at 10 minutes and 40 minutes past the hour, every hour, except between the hours of 2am and 4am. How do you do this?

Here’s my answer: Opalis is not meant to be a sophisticated scheduling utility. The scheduling functionality in the product provides some basic usage scenarios, but more complex scenarios, even though they can be done, take a little more work.

There are two parts to scheduling: the global Schedules Templates and Schedule Objects.

  • The global schedule template allows you to set up hourly/daily parameters and allows you to include or exclude specific time slots. This is used in conjunction with a Check Schedule object in the workflow, which reads the template and acts as a filter to allow or prevent continued operation of the policy path.
  • The Date/Time Monitor triggers a task at a specific time and allows you to set intervals. The functionality does not allow you to set :10 and :40 in a single monitor (but you could do :00 and :30).

Here’s how you would build a policy to solve this scenario:

  1. In the Opalis Designer Client console, open Global Settings, right-click on Schedules and select New > Schedule

  2. Name the schedule “All times except 2-4am

  3. On the Details tab, click the Hours button

  4. Select the two columns for 2am to 4am and then click the Denied option on the right

  5. Click OK to save the hours settings and then Finish to save the schedule template.

  6. Create a new Policy

  7. From the Scheduling category, add a Monitor Date/Time object to the policy

  8. Open the Properties settings and change the name to “Fire every 10 minutes

  9. Next on the details tab, set it to run "Every 10 minutes”. Also be sure to check the box next to At time slices within the hour so you’re sure it occurs at the exact 10 minute division of the hour. 

  10. Click Finish to save it

  11. Add a Check Schedule object to the policy from the Scheduling category.

  12. Open the Properties and set the Schedule Template to the schedule you just created. Click Finish.

  13. Link the Monitor Object to the Check Schedule object.

  14. Double-click the link to open the Properties Dialog

  15. On the General tab, rename the link to “ :10 or :40

  16. On the Include tab, click on the condition link to open the Published Data dialog.

  17. Check the box next to Show common Published Data, and then select Object end time (minutes) from the list, then click OK.

  18. Click on the value link to change the condition value. Set the value to 10.

  19. Click Add to add another condition. Click on the new condition link to open the Published Data dialog.

  20. Check the box next to Show common Published Data, and then select Object end time (minutes) from the list, then click OK.

  21. Click on the value link to change the condition value. Set the value to 40.
    Your Include Filters should now look like this:

  22. Click Finish to save the link properties.

    Note: If your link does not show the link name text, go to Options > Configure and check the box next to Show link labels, then click Finish.

  23. From the System category, add a Run Program object to your policy.

  24. Link the Check Schedule object to your Run Program task.

  25. Open the link properties and change the Include properties so that it looks like this:

  26. Click Finish to save.

Your policy should look like this:


Now every 10 minutes, the monitor will fire, and if the interval is at 10 minutes or 40 minutes past the hour, the link will allow passing the workflow to the Check Schedule object. If it's not between 2am and 4am, it will succeed and then kick off the Run Program task.

In reality, this sounds a lot harder than it is. It's really just a couple more steps but is still intuitive if you're looking at the workflow. No weird scripting or anything needed.

Well that wasn’t too hard, was it? Maybe I should create a video of this too for those of you that want a little more animation :)

Share this post :