Output from a batch job can take many forms:
-
stderr/stdout
-
Outbound Staging (files generated by the job that you want to copy to other directories or computers)
-
Notification messages (error and informational messages generated in running the job)
No privileges are required (other than access to the files) to request, generate, or receive batch job output files. However, information that affects the handling of batch job output can only be specified at job submission.
Using Batch Manager:
-
During job submission, select the Output tab from the Job Submit dialog to specify options for stderr and stdout.
-
Select the File Staging tab to control outbound file staging.
-
Select the Notification tab to control notification options.
-
Submit the job when the Job Submit dialog is complete by clicking OK.
Using the command line:
Flags on the qsub command affect job output as follows:
stdout |
-eo |
Writes stderr to stdout |
-ko |
Location |
|
-jy |
Writes stderr to stdout |
|
-N |
Name |
|
-o |
Location and name |
|
-r |
Name |
|
-ro |
Spooling options |
|
stderr |
-eo |
Writes stderr to stdout |
-e |
Name |
|
-jy |
Writes stderr to stdout |
|
-ke |
Location |
|
-N |
Name |
|
-r |
Name |
|
-re |
Spooling options |
|
Outbound Staging |
-so |
Specifies file staging list. |
Notification |
-M |
Specifies an address or list of addresses other than the default. |
-mu |
Specifies a single address. |
|
-me |
Send mail at job end. |
|
-mb |
Send mail at job beginning. |
|
-ma |
Send mail on job abort. |
|
-mn |
Send no mail |
|
Reoccurrence |
-O desc |
Specifies a reoccurring job. Desc is a descriptor of the form FffIiiMmmWwwYyy The descriptor is defined in more detail in the following table. |
The reoccurrence descriptor:
Meaning |
Flag (F) value Hex |
Interval (I) value decimal |
Month Interval (M) value decimal |
Week (W) mask Hex |
Year (Y) value decimal |
---|---|---|---|---|---|
Hourly frequency |
01 |
01 to 99(hours) |
00 |
00 to 7f (day of week mask) |
00 |
Daily frequency |
02 |
01 to 31 (days) |
00 |
00 |
00 |
Weekly frequency |
04 |
01 to 05 (week) |
00 |
00 to 7f (day of week mask) |
00 |
Specific Monthly frequency |
28 |
00 |
00 to 12 (month) |
00 to 1f (day of month 1 to 31 decimal) |
00 |
Determined Monthly frequency |
48 |
01 to 05 (ordinal) |
00 |
00 to 7f (days) |
00 |
Specific Yearly frequency |
30 |
00 |
00 |
00 to 1f (day of month 1 to 31 decimal) |
00 to 12 (month of year) |
Determined Yearly frequency |
50 |
01 to 05 (ordinal) |
00 |
00 to 1f (day of week mask) |
00 to 12 (month of year) |
Examples:
qsub -q \\gene\myqueue -O f01i01m00w3ey00 "c:\users\default\myscript.bat<tab>/help"
will cause the script file "myscript.bat" to execute every hour starting at the current time on Monday through Friday. The "<tab>" represents the tab character, and is used to separate arguments from the script name.
Using the Batch API:
1. Edit the BATCH_JOB_INFO_2 structure:
Element |
Affects |
Specifies |
---|---|---|
stdout |
Pathname to stdout. |
stderr |
stderr |
Pathname to stderr. |
flags (BATCH_JOB_FLAG_<value>): |
stdout |
Retain stdout on execution host. |
KEEP_STDERR |
stderr |
Retain stderr on execution host |
NOSPOOL_STDOUT |
stdout |
Write stdout directly instead of spooling it. |
NOSPOOL_STDERR |
stderr |
Write stderr directly instead of spooling it. |
COMBINED_OUTPUT |
stderr/stdout |
Combine stderr and stdout. |
outfiles array |
Outbound Staging |
File staging list. |
mailaddress |
Notification |
SMTP mail address or computer name (for event logging). |
2. Use the QueueBatchJob function with the edited structure to submit the job. |