BATCH_JOB_INFO_2 - Intergraph Batch Services - Help

Intergraph Batch Services Help

Language
English
Product
Intergraph Batch Services
Search by Category
Help

The BATCH_JOB_INFO_2 structure contains all of the information about a batch job and its attributes.

Structure

struct_batchjobinfo2

{

LPTSTR jobid

/* full unique job identifier */

LPTSTR owner

/* who owns this job */

LPTSTR name

/* user description of job */

long priority

/* assigned job priority */

DWORD runpriority

/* system priority level to run job at */

DWORD restartable

/* should job ever be restarted? */

FILETIME starttime

/* when to run the job. */

DWORD size

/* size of job data files */

DWORD state

/* state of the job */

LPTSTR qname

/* which queue this job is in */

DWORD holds

/* types of hold on job */

LPTSTR script

/* path of script to execute */

LPTSTR reserved2

/* reserved for future use */

LPTSTR Stderr

/* path of stderr file */

LPTSTR Stdout

/* path of stdout file */

FILETIME system

/* amount of system time used */

FILETIME user

/* amount of user time used */

LPTSTR shell

/* which shell to use. NULL=default */

char **envp

/* execution environment */

LPTSTR logmsg

/* user-defined log msg */

LPTSTR account

/* accounting label */

LPTSTR *infiles

/* files to stage in */

LPTSTR *outfiles

/* files to stage out */

DWORD origin

/* native NT, other */

LPTSTR *mailaddress

/* list of addresses to send mail to */

DWORD flags

/* bit mask of flags for batch job */

DWORD filesizelimit

/* limit on the size of files in this job */

BATCH_RECURRENCE_INFO recurrence

/* recurring job information */

} BATCH_JOB_INFO_2, *PBATCH_JOB_INFO_2;

Parameters

LPTSTR jobid

A string containing the unique job identifier. No two jobs may have the same jobid. The jobid string is in the format idnum.orighost, where orighost is the name of the computer to which the job was originally submitted, and idnum is the nth job submitted to that host. The id numbers do not exceed 5 digits, and are reset to zero after 99,999 jobs have been submitted.

LPTSTR owner

The account name of the owner of this batch job.

LPTSTR name

The user-supplied name of the job.

long priority

The job priority used for scheduling execution of the job. Higher priority jobs are placed first in the queue, and run before lower priority jobs.

DWORD runpriority

The system execution priority for the job. This must be less than or equal to the runprilimit of the queue. The following priorities are valid:

IDLE_PRIORITY_CLASS

NORMAL_PRIORITY_CLASS

HIGH_PRIORITY_CLASS

REALTIME_PRIORITY_CLASS

A REALTIME process preempts all other processes, including the operating system. Intergraph recommends that you avoid using the REALTIME priority.

DWORD restartable

Whether the job should be rescheduled in the event that the job is aborted due to a system error or crash. A non-zero value causes the job to be rescheduled.

FILETIME starttime

The time at which the job is to be executed. If this time is 0 or less than the current time, then the job will be executed as soon as possible.

DWORD size

The sum of size of all files associated with this job.

DWORD state

The state of the job. The following states are possible:

BATCH_JOB_STATE_QUEUED

The job has been queued.

BATCH_JOB_STATE_RUNNING

The job is currently running.

BATCH_JOB_STATE_HELD

The job is in a hold state.

BATCH_JOB_STATE_WAITING

The job is waiting for execution.

BATCH_JOB_STATE_EXITING

The job has completed, and is exiting the batch subsystem.

BATCH_JOB_STATE_TRANSITING

The job is being transferred.

BATCH_JOB_STATE_ARRIVING

The job is arriving in the batch subsystem.

BATCH_JOB_STATE_RECURRING

The job is a recurring job.

LPTSTR qname

The name of the queue in which the job resides.

DWORD holds

Any combination of BATCH_USER_HOLD or BATCH_MGR_HOLD. If this value is 0, then no holds are applied to the job. (The holds value is a bitwise OR of the applicable hold types.) Jobs may be submitted with a user hold.

LPTSTR script

The pathname of the batch job script file. This script contains the commands for the shell that comprise the batch job.

LPTSTR reserved2

Reserved for future use.

LPTSTR Stderr

The path name of the file that will contain the standard error output of the job. If this value is NULL, then a default stderr path name will be used (jobname.e).

LPTSTR Stdout

The pathname of the file that will contain the standard output of the batch job. If this value is NULL, then a default stdout path name will be used (jobname.o).

FILETIME system

The total amount of system execution time used by this job.

FILETIME user

The total amount of user execution time used by this job.

LPTSTR shell

The name of the command interpreter for running the shell script.

char **envp

A list of environment variables to be used in the batch job environment during execution.

LPTSTR logmsg

A user-defined line of text to be inserted into the log file when the job is executed.

LPTSTR account

A user-defined text string that may be used for accounting purposes.

LPTSTR infiles

A list of files that the batch job requires before beginning execution. This is also called "staging files in." The format of this list is dest_file=source_file, where dest_file is the name to call the file on the execution machine, and source_file is the name of the file to send to the execution computer. For more information, see File Staging.

LPTSTR outfiles

A list of files that the batch job returns to the user after execution. This is also called "staging files out." The format of this list is source_file=dest_file, where source_file is the name of the file on the execution computer, and dest_file is the name and location of the output file. For more information, see File Staging.

DWORD origin

A value determining where the job came from, and thus the transport mechanism to use when returning files to a remote client. The following values are possible:

BATCH_JOB_ORIGIN_LOCAL

For a job that has not left the local computer.

BATCH_JOB_ORIGIN_NT

For a job that originated on an Windows computer.

LPTSTR *mailaddress

A NULL-terminated list of strings representing addresses that mail about this batch job may be sent to. Currently, the formats supported are SMTP mail addresses and event log messages. If this field is supplied by the user as NULL, a default of \\localhost is used. In this case, messages about the job are sent to the event log on the local host.

DWORD flags

A bitmask of flags that affect the batch job. The following flags are valid:

BATCH_JOB_FLAG_KEEP_STDOUT

BATCH_JOB_FLAG_KEEP_STDERR

BATCH_JOB_FLAG_NOSPOOL_STDOUT

BATCH_JOB_FLAG_NOSPOOL_STDERR

BATCH_JOB_FLAG_MAIL_BEGINNING

BATCH_JOB_FLAG_MAIL_END

BATCH_JOB_FLAG_MAIL_ABORT

BATCH_JOB_FLAG_COMBINE_OUTPUT

BATCH_JOB_FLAG_HOURLY_FREQUENCY

BATCH_JOB_FLAG_DAILY_FREQUENCY

BATCH_JOB_FLAG_WEEKLY_FREQUENCY

BATCH_JOB_FLAG_MONTHLY_FREQUENCY

BATCH_JOB_FLAG_YEARLY_FREQUENCY

BATCH_JOB_FLAG_SPECIFIC_TYPE (must be used with either BATCH_JOB_FLAG_MONTHLY_FREQUENCY or BATCH_JOB_FLAG_YEARLY_FREQUENCY)

BATCH_JOB_FLAG_DETERMINED_TYPE (must be used with either BATCH_JOB_FLAG_MONTHLY_FREQUENCY or BATCH_JOB_FLAG_YEARLY_FREQUENCY)

BATCH_RECURRENCE_INFO recurrence

Describes scheduling details of jobs that run more than once. Unused unless a recurring job flag is set in the flags field.