BATCH_RECURRENCE_INFO - Intergraph Batch Services - Help

Intergraph Batch Services Help

Language
English
Product
Intergraph Batch Services
Search by Category
Help

The BATCH_RECURRENCE_INFO structure contains scheduling information for recurring jobs . It is only used within the BATCH_JOB_INFO_2 structure and is ignored unless one of the recurring jobs flags is set in the flags field of the BATCH_JOB_INFO_2 structure. The interpretation of its contents depends on which recurring job flags are set in the flags field.

Two types of monthly and yearly recurring jobs are available. When using the API to schedule monthly or yearly recurring jobs, you must specify which type of monthly or yearly job you are scheduling by using either the BATCH_JOB_FLAG_SPECIFIC_TYPE or the BATCH_JOB_FLAG_DETERMINED_TYPE along with the monthly or yearly frequency type in the flags field of the BATCH_JOB_INFO_2 structure.

The first type of monthly or yearly job is called specific since the user specifies a specific execution date for it. An example of a specific monthly job is a job that is scheduled to run on the 15th day of every 2 months. An example of a specific yearly job is a job that is scheduled to run on July 30 of each year.

The second type of monthly or yearly job is called determined since its actual execution date is not specified but instead is determined from the scheduling information that is supplied. An example of a determined monthly job is a job that is scheduled to run on the last Tuesday of every 2 months. An example of a determined yearly job is a job that is scheduled to run on the third Wednesday of July of each year.

Structure

typedef union _recurrenceInfo

{

struct union

{

BYTE interval;

/* BATCH_JOB_FLAG_HOURLY_FREQUENCY: hour interval,

BATCH_JOB_FLAG_DAILY_FREQUENCY: day interval,

BATCH_JOB_FLAG_WEEKLY_FREQUENCY: week interval,

BATCH_JOB_FLAG_DETERMINED_MONTHLY_FREQUENCY:

Nth day information (1st, 2nd, 3rd, 4th, or last (5) day, weekday, or

weekend day) or

BATCH_JOB_FLAG_DETERMINED_YEARLY_FREQUENCY:

Nth day information (1st, 2nd, 3rd, 4th, or last (5) day, weekday, or

weekend day) */

BYTE month_interval;

/* BATCH_JOB_FLAG_SPECIFIC_MONTHLY_FREQUENCY:

month interval, or

BATCH_JOB_FLAG_DETERMINED_MONTHLY_FREQUENCY:

month interval. */

BYTE day_information;

/* BATCH_JOB_FLAG_WEEKLY_FREQUENCY:

day of the week mask,

BATCH_JOB_FLAG_DETERMINED_MONTHLY_FREQUENCY:

day of the week mask,

BATCH_JOB_FLAG_DETERMINED_YEARLY_FREQUENCY:

day of the week mask,

BATCH_JOB_FLAG_SPECIFIC_MONTHLY_FREQUENCY:

day of the month, or

BATCH_JOB_FLAG_SPECIFIC_YEARLY_FREQUENCY:

day of the month. */

BYTE month_of_year;

/* BATCH_JOB_FLAG_SPECIFIC_YEARLY_FREQUENCY:

month of the year, or

BATCH_JOB_FLAG_DETERMINED_YEARLY_FREQUENCY:

month of the year. */

} recurrence_info;

DWORD recurrence_data;

} BATCH_RECURRENCE_INFO, *PBATCH_RECURRENCE_INFO;

Parameters

BYTE interval

A byte containing the hourly interval for hourly jobs, the daily interval for daily jobs, or the weekly interval for weekly jobs. The valid interval values are 1 to 99. For monthly and yearly-determined jobs, this byte contains a number from 1 to 5 representing an ordinal (first, second, third, fourth, or last) that indicates which day, weekday, or weekend day is being chosen. For example a 1 would mean the first such day, and a 5 would mean the last such day.

BYTE month_interval

A byte containing a number that represents the monthly interval for monthly recurring jobs. Valid values are 1 to 99.

BYTE day_information

A byte containing a mask that represents the selected days of the week for weekly jobs, monthly-determined jobs, or yearly-determined jobs. Use the BATCH_JOB_*_OCCURRENCE defines for 'day of the week' mask values. For monthly specific jobs and yearly specific jobs, this number represents a specific day of the month.

BYTE month_of_year

A byte containing a number that represents the month of the year for yearly specific and yearly-determined jobs. The 'month of the year' the values are: January = 1, February = 2, ..., December = 12.