Creates a new job on specified computer(s) with the ability to set scheduling information, attach an action KS, and override default parameters.
Modified from base script by: Jeff Kaczor - x7114 Date Last Modified: April 26, 2002
Modified to incorporate errorlevel code returns for external script processing, the ability to create a job on multiple machines, and to set the job schedule to runonce with a specific date and time or to runonce immediately. Added the ability to specify an Action Knowledge Script to be bound to the job that is created.
Also, added additional error checks and validations to improve robustness of the script and the ability to override KS default parameters.
Added the ability to override the specified scheduled time for time zone synchronization. Useful if your external script targets multiple time zones and uses only one time varible as a paramemter. This script can be called for each time zone, passing the parameter for the time to run with an offset to ensure that the jobs all run at the exact same moment in time. Another use would be to stagger the time of execution over multipe targets based off a single time variable.
Also added the noval parameter which turns off the schedule validation routine. If the job is scheduled to occur in the past, instead of returning an error, it will be created and NetIQ will run the job immediately. Useful if you need to schedule a job that occurs two hours before another job by default, and there is less than two hours before the 2nd job fires. You can still create the job with the original scheduled time information and have the system execute immediately.
Note: If you pass in a time without a date, the system will do the following. First, it will assume today's date. If the time occurs in the past, it will schedule the job to execute at the specified time on the next day. If you pass in only a date, the system will assume the current time.
After processing the time and date parameters, the offset is then applied to the time and date to calculate the final time to execute the job at.