Home Orchestrator

Set RunBook to run only on 1st day of each month

VikVik Member IT Monkey ✭

Hi Guys,

We've got a Orchestrator RunBook that runs and sends reports, and want it to run only on the first day of each month. Is there a way we can achieve this?

Many thanks in advance

Best Answers

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓

    Hello @Vik ,

    actually it is pretty simple to accomplish that :)


    In your runbook designer you should see the following:


    Click on the "Global Settings" --> Schedules.

    In our environment we created subfolders for daily/monthly/weekly schedules but you could also create em all in the parent folder.

    Righ click and select New --> Schedule

    In the General Tab give it a name and a short description and in the Details tab you can then select "Days of month" and type in 1:

    Click on the "Hours" button and select the hour, when it is allowed to run, e.g. at 08:00.

    You could also select dates, where it shall not run , e.g. on holidays. This can be achieved with the Exceptions tab.

    After you created this schedule, just right click on the runboo, which should be run with that schedule and click on properties. On the General Tab click on the three dots beside "Schedule".

    Then just select the schedule you just created. Click finish, check in the runbook and that's it :)

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓

    @Brian_Wiest That's why we build all of our schedules with monitor date/time and check schedule.

    As we have 2 runbook servers with both up to 100 runbooks running at the same time, this works perfectly for us. The monitoring and schedule runbooks are all running on the secondary runbook server, so the primary is "free" for Runbooks from service requests etc.

    But you are right, especially in larger environments this might lead to a major impact.


    @Vik : We set it up that way:

    1. Monitor date/time scheduled for a certain time. The monitor is permanently running and at the scheduled time it will then run into the Check Schedule activity
    2. If the "Confirms to Schedule" is true, the runbook will be invoked.

    AGain, this solution works well for us, but as Brian stated, these runbooks are running 24/7 and take up some space which you might need for other runbooks.

Answers

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓

    Hello @Vik ,

    actually it is pretty simple to accomplish that :)


    In your runbook designer you should see the following:


    Click on the "Global Settings" --> Schedules.

    In our environment we created subfolders for daily/monthly/weekly schedules but you could also create em all in the parent folder.

    Righ click and select New --> Schedule

    In the General Tab give it a name and a short description and in the Details tab you can then select "Days of month" and type in 1:

    Click on the "Hours" button and select the hour, when it is allowed to run, e.g. at 08:00.

    You could also select dates, where it shall not run , e.g. on holidays. This can be achieved with the Exceptions tab.

    After you created this schedule, just right click on the runboo, which should be run with that schedule and click on properties. On the General Tab click on the three dots beside "Schedule".

    Then just select the schedule you just created. Click finish, check in the runbook and that's it :)

  • VikVik Member IT Monkey ✭

    Thanks @Simon_Zeinhofer ,

    Do i still need the Monitor Date/Time activity too, or just the Check Schedule activity?

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    @Vik as far as I know, you don't need any of those if you set the schedule directly in the runbook.


    But we always use it with monitor date/time and scheck schedule activities.

  • VikVik Member IT Monkey ✭

    Great, thanks @Simon_Zeinhofer ,

    I've set Monitor Date/Time activity Interval at 08:00 (time we want it to run) and Check Schedule activity to Days of Month to 1. My understanding it that Monitor Date/Time will trigger every 08:00 but will first check with Check Schedule for condition (such as only 1 day of month). Am I correct?

  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭

    @Simon_Zeinhofer

    While that method will meet the need the downside is that runbook still is always running, impacting your concurrent runbook allotment. (50 Per Server)

    We accomplish a schedule of any runbook that runs on an once daily or less via a schedule task that calls the SCORCH powershell to launch the runbooks. This way on the weekend the weekly/monthly jobs will run but not impact our business hours concurrent count.

    HTH

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓

    @Brian_Wiest That's why we build all of our schedules with monitor date/time and check schedule.

    As we have 2 runbook servers with both up to 100 runbooks running at the same time, this works perfectly for us. The monitoring and schedule runbooks are all running on the secondary runbook server, so the primary is "free" for Runbooks from service requests etc.

    But you are right, especially in larger environments this might lead to a major impact.


    @Vik : We set it up that way:

    1. Monitor date/time scheduled for a certain time. The monitor is permanently running and at the scheduled time it will then run into the Check Schedule activity
    2. If the "Confirms to Schedule" is true, the runbook will be invoked.

    AGain, this solution works well for us, but as Brian stated, these runbooks are running 24/7 and take up some space which you might need for other runbooks.

  • VikVik Member IT Monkey ✭
    edited May 2022

    Thanks guys,

    We currently only have 2 RBs running on the server, so allotments is not a problem at the moment, but you guys are right about using Task Scheduler. Something I can look into...when time comes.

    Many thanks for your inputs @Simon_Zeinhofer and @Brian_Wiest .

  • VikVik Member IT Monkey ✭

    Hi @Simon_Zeinhofer @Brian_Wiest ,

    I've tried creating the Runbook with:

    Monitor Date/Time (set to Monday/ or day of Month, Hours 8-10 Permitted) => .Net Activity (Check Disk Space) => Email (Email Disk Report).


    As soon as i press Run, it starts then runs straightaway outside the time set in Monitor Date/Time, then stops showing Start time, and doesn't start again (settings set on Monitor Date/Time) Any idea?


    Thanks in advance.

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    Hello @Vik ,


    sorry for the late response.

    At first, have you set the schedule for the runbook in the runbook properties? If yes, have you set it to 1st day of month?

    If that does not function as expected delete the schedule in the properties of the runbook and insert a "Monitor date/time" Activity at first. So the runbook will always run, but it occurs every 1st of the month.

    Second, What is the condition in the Link between Start Date and Check Space?

    It should look like that:


    If you set it this way, the runbook will monitor the time and will run into the Check schedule, BUT will only go forward if it is the first of the month.

  • VikVik Member IT Monkey ✭

    Thanks @Simon_Zeinhofer, I haven't had a chance to check this but will let you now once i do.

Sign In or Register to comment.