Scheduling functions in M3 BE job scheduler

This section explains how to define the settings required for M3 BE Job Scheduler and how to use it to schedule functions. In this context, a job schedule function is a function that allows time-dependent scheduling for batch jobs.

Note: This function is not related to the M3 program in 'Function. Open' (MNS110).

Workflow

These steps are described in detail in the following sections.

  1. Define job schedule category (CSYTAB table)

    Define the different types of jobs to run in 'Job Schedule Category. Open' (SHS050). For each category, you select the earliest and latest time a job connected to the job category can be scheduled to run. Such specification is necessary when batch jobs must be run in a certain order.

  2. Define job scheduling function in job scheduling routine (CSHFNC table)

    In 'Job Schedule Function. Open' (SHS030), you define, for each function or menu program, whether it is allowed to be scheduled or must be scheduled. You also define the actual program file that runs the job, usually a program file with the suffix CL.

    This definition can be done for all users or for a specific user. The difference between the two is that the latter enables you to review scheduled jobs per user (see below). To each program to be included, you can connect a job schedule category.

  3. Define job scheduling programs and fields (SHS031) (SHS035)
  4. Schedule jobs for function (SHS230) (SHS231)

    Whenever you manually start a function included in the job scheduling routine, 'Job Schedule Information. Open' (SHS230/E) is displayed before the job is submitted to the job queue. There, you define when and with which frequency the menu program should be run.

    If you define an interval for the job, for example every Thursday, the sub-program 'Job Schedule Constant. Open' (SHS231) is then automatically displayed. This program enables you to add or subtract days from the date fields used in the selected function. For example, when scheduling printing of invoices in 'CO Invoice. Print' (OIS180), you can select to print invoices for all deliveries with planned delivery date three days ago.

  5. Review and adjust scheduled jobs

    To review and change the dates and times for scheduled jobs, use 'Job Schedule Entry. Update' (SHS010) (displaying all jobs) and 'Job Schedule Entry. Update/User' (SHS011) (displaying all jobs for current user).

    The jobs are listed per menu program and version number. The first menu program scheduled gets a version number, and for subsequent schedules of the same function, the version number is increased by one each time.

    You can also print lists with information for each menu program included in 'Job Schedule. Print' (SHS800/1) and 'Job Schedule. Print/User' (SHSS800/2).

  6. After the function is scheduled, you still have these options:
    • Change or delete function schedule (SHS010)
    • Run the function on schedule