Scheduling a Process Flow

How to:

Reference:

DataMigrator provides several ways to run data and process flows. In addition to executing flows immediately, you can use the DataMigrator internal scheduler to run requests off-hours, on a recurring basis, or on specified days of the week or month.

Alternatively, you can schedule or execute a flow from an application other than DataMigrator. For details, see Event-Based Scheduling.

You can also disable a scheduler without removing the Schedule object from the flow.

You can schedule a process flow to run in the following ways:

When the scheduler checks, it executes all flows scheduled to run in the period of time since the scheduler last checked.

To access DataMigrator Scheduler parameters:
  1. Expand the Workspace folder.
  2. Expand the Special Services and Listeners folder, right-click SCHEDULER, and click Properties.

For scheduled flows to run, the scheduler must be running. On the Scheduler Configuration dialog box, the sched_autostart drop-down menu must be set to yes.

Note: You can also add or change schedule properties from the Web Console.

Procedure: How to Schedule a Process Flow to Run Once

  1. Right-click the Start object in the Process Flow tab and click Properties.

    The Properties pane opens.

  2. Select Active from the Schedule Status drop-down menu.
  3. Select Run Once from the Schedule Type drop-down menu.
  4. Select a start date in the Start Date field by typing the date in the month/day/year areas, or by clicking the down-arrow to open a calendar in which you can choose a date. The default is the current day.
  5. Select a start time in the Start Time field by typing values directly into the hour/minute/seconds/AM or PM areas, or by highlighting an area and using the Up and Down Arrow keys to select new values. The default is the current time.
  6. Close the pane.
  7. Click the Save button to update the process flow.

Procedure: How to Schedule a Process Flow to Run on a Recurring Interval

  1. Right-click the Start object in the Process Flow tab, and click Properties.

    The Properties pane opens.

  2. Select Active from the Schedule Status drop-down menu.
  3. Select Recurring from the Schedule Type drop-down menu.
  4. Select an interval type (such as daily, monthly) from the Interval Type drop-down menu.
  5. Specify an interval number in the Interval Value field to indicate the frequency of execution. For example, if you select Weekly as your Interval Type, and 2 as your Interval Value, the flow will be executed every two weeks.
  6. Select a start date in the Start Date field by typing the date in the month/day/year areas, or by clicking the down-arrow to open a calendar from which you can choose a date. The default is the current day.
  7. Select a start time in the Start Time field by typing values directly into the hour/minute/seconds/AM or PM areas, or by highlighting an area and using the Up and Down Arrow keys to select new values. The default is the current time.
  8. Optionally, select an end date and time by selecting the Specify End Date check box. Specify the end date by typing the date in the month/day/year areas, or by clicking the down-arrow to open a calendar from which you can choose a date. Specify the time by typing values directly into the hour/minute/seconds/AM or PM areas, or by highlighting an area and using the Up and Down Arrow keys to select new values.
  9. Optionally, specify special date and time ranges. You can configure the scheduler to run on specific days of the week or month, on the last day of the month, or specify the beginning and ending times of the daily time span.
  10. Close the pane.
  11. Click the Save button to update the process flow.

Tip: If you wish to stop a query from executing regularly, you do not need to change the schedule. Instead, set Schedule Status to Inactive in the Schedule attribute pane.

Procedure: How to Schedule a Process Flow to Run at Multi-Day Intervals

  1. Right-click the Start object in the Process Flow tab and click Properties.

    The Properties pane opens.

  2. Select Active from the Schedule Status drop-down menu.
  3. Select Multi-Day from the Schedule Type drop-down menu.
  4. Select a start date in the Start Date field by typing the date in the month/day/year areas, or by clicking the down-arrow to open a calendar from which you can choose a date. The default is the current day.
  5. Select a start time in the Start Time field by typing values directly into the hour/minute/seconds/AM or PM areas, or by highlighting an area and using the up and down arrows to select new values. The default is the current time.
  6. Optionally, select an end date and time by selecting the Specify End Date check box. Specify the end date by typing the date in the month/day/year areas, or by clicking the down-arrow to open a calendar from which you can choose a date. Specify the time by typing values directly into the hour/minute/seconds/AM or PM areas, or by highlighting an area and using the up and down arrows to select new values.
  7. Configure the scheduler to run on specific days of the week or month, on the last day of the month, or specify the beginning and ending times of the daily time span.
  8. Close the pane.
  9. Click the Save button to update the process flow.

Tip: If you wish to stop a query from executing regularly, you do not need to change the schedule. Instead, set Schedule Status to Inactive in the Schedule attribute pane. For details about setting flow properties, see Setting Flow Properties.

Procedure: How to Schedule a Process Flow to Run on Holidays

You can schedule a process flow to execute or not execute on holidays. The Holiday option is available when Recurring or Multi-Day are selected in the Schedule Type drop-down menu. For more information, see Specifying Holiday File.

Note: You can only schedule the flow to run on holidays after you create a holiday file.

  1. Right-click the Start object in the Process Flow tab and click Properties.

    The Properties pane opens.

  2. Select Active from the Schedule Status drop-down menu.
  3. Select Recurring or Multi-Day from the Schedule Type drop-down menu.
  4. Select an option from the Run on Holidays drop-down menu. The following options are available:
    Skip

    Excludes a run on desired holidays.

    Only

    Only run on desired holidays.

    Run
    Only available if the schedule type is set to Multi-Day. Runs on all holidays.
  5. Click the Save button to update the process flow.

To verify that the holiday schedule is set, in the navigation pane, expand the Workspace folder. Then expand the Special Services and Listeners folder. Right-click SCHEDULER and click Scheduled Events. The Scheduler/Scheduler Events report should list scheduled flows by the holiday set date.

Procedure: How to Schedule a Process Flow to Run When the Server Starts

You can schedule a process flow to run whenever the DataMigrator server is started. This option is useful that need to run all of the time, for example, when using Change Data Capture or File Listener capabilities.

  1. Right-click the Start object in the Process Flow tab and click Properties.

    The Properties pane opens.

  2. Select Active from the Schedule Status drop-down menu.
  3. Select Run when server starts from the Schedule Type drop-down menu.
  4. Click the Save button to update the process flow.

Procedure: How to Disable a Schedule Object

You can disable a the schedule of a flow from the Properties pane for a schedule.

  1. Right-click the Start object in the Process Flow tab and click Properties.

    The Properties pane opens.

  2. Select Inactive from the Schedule Status drop-down menu.
  3. Close the pane.

Reference: Schedule Attribute Pane

To access the Schedule attribute pane shown in the following image, right-click the Start object and click Properties.

Schedule Properties

The Schedule attribute pane contains the following fields and options:

Schedule Status

Determines if there is a schedule and if so, whether the schedule is active or inactive.

Schedule Type

Determines whether a process flow will execute once, on a recurring basis, on several specific days (Multi-Day), or when the server starts.

Interval Type

Specifies the interval in which a process flow will be executed. For example, if you select Month as your Interval Type, and select 2 as your Interval Value, the flow will execute every two months. This option is only available if the schedule type is set to Recurring.

Interval Value

Specifies the frequency at which a process flow will be executed. For example, if you select Week as your Interval Type, and select 2 as your Interval Value, the flow will execute every two weeks. This option is only available if the schedule type is set to Recurring.

Start Date

Specifies the start date for the execution of the process flow.

Start Time

Specifies the start time for the execution of the process flow.

Specify Stop Time

Allows you to specify an end time for the execution of the process flow. This option is only available if the schedule type is set to Run Once or Multi-Day.

Specify End Date
Allows you to specify an end date and time for the execution of the process flow. This option is only available if the schedule type is set to Recurring or Multi-Day.
End Date

Specifies the end date for the execution of the process flow. This option is available if Specify End Date is selected.

End Time

Specifies the end time for the execution of the process flow. This option is available if Specify End Date is selected.

Days of the Week

Specifies the day of the week on which the process flow will be executed. This option is only available if the schedule type is set to Recurring or Multi-Day.

Days of the Month

Specifies the day of the month on which the process flow will be executed. This option is only available if the schedule type is set to Recurring or Multi-Day.

Intraday Start

Specifies the beginning of the daily time span of the process flow. This option is only available if the schedule type is set to Recurring.

Intraday End

Specifies the end of the daily time span of the process flow. This option is only available if the schedule type is set to Recurring.

Run on Holidays

Specifies the option to execute the process flow on desired holidays.

The following options are available:

  • Skip. Excludes run on desired holidays.
  • Only. Only run on desired holidays.

This option is only available if the schedule type is set to Recurring or Multi-Day.

Log and output Destinations

This option controls where the log information from the Maintenance Job should be sent when the Job finishes.

The following options are available:

  • ETLLOG. The log is sent to the DataMigrator log.
  • EDAPRINT. The log is sent to the Server log.
  • E-Mail. The log is sent as an attachment to an email message if specified in Job Properties.

    Multiple options can be selected. The default values for this option are ETLLOG and E-Mail.

    Note: If the job is run from the DMC or Web Console, information will go to the console log regardless of this setting.

  • Send HTML output as inline message. When selected, if any stored procedures called by the flow generate an output, the message is included as message text, instead of as an attachment.
    Note: This option for a flow schedule works in conjunction with the Merge formatted output into log option that is available for a Scheduler Special Service. The following considerations should be taken into account:
    • When the Send HTML output as inline message and Merge formatted output into log options are selected, the submitted flow emails the attached ETLLOG file and the HTML output is embedded into the body of the email.
    • When the Send HTML output as inline message and Merge formatted output into log options are not selected, the submitted flow emails the attached ETLLOG file and the HTML output is embedded into the attached ETLLOG file

Reference: Specifying Holiday File

You can specify a list of dates that are designated as holidays in your company. These dates can be scheduled to be excluded, only included, or included to run with regular days in the process flow. To define a list of holidays, you must create a holiday file using a standard text editor and select the holiday file by issuing the SET command with the HDAY parameter.

  1. In a text editor, create a list of dates designated as holidays using the following rules for creating a holiday file:
    • Dates must be in YYMD format.
    • Dates must be in ascending order.
    • Each date must be on its own line.
    • You may include an optional description of the holiday, separated from the date by a space.

    For example: 20160315 Ides of March

  2. Save the file into the dm\etc directory:

    In Windows and UNIX the file must be HDAYxxxx.err.

    In OS/390, the file must be a member of ERRORS named HDAYxxxx, where xxxx is a string of text four characters long.

  3. From the navigation pane, expand the Workspace folder. Expand the Configuration Files folder and right-click Server Profile - edasprof.prf. Click Edit and type:
    SET HDAY = xxxx

    where:

    xxxx

    Is the part of the name of the holiday file after HDAY. This string must be four characters long. For example, if your file name is hdaymyh1.err, then the setting will be SET HDAY = myh1.

    Note: Alternatively, instead of the server profile, the setting can be saved in the user profile for the scheduler as set in sched_scan_id.

  4. Save the new Server Profile.
  5. Test that holiday is correctly set up by creating a sample hdayfile synonym.
    FILENAME=HDAYFILE, SUFFIX=FIX     ,
     DATASET=C:\ibi\srv77\dm\etc\hdaymyh1.err, $
      SEGMENT=HDAYFILE, SEGTYPE=S0, $
        FIELDNAME=HDAY_DATE, ALIAS=hddate, USAGE=YYMD, $
        FIELDNAME=HDAY_DESC, ALIAS=hddesc, USAGE=A66, ACTUAL=A68, $

    Note: DATASET should be set to your appropriate directory path.

  6. Run Sample Data for hdayfile synonym. An example of the sample data is shown in the following image.
    Sample Data for hdayfile synonym

WebFOCUS

Feedback