The Win32_ScheduledJob class represents a job scheduled using the network management schedule service functions (also known as "Job" and "AT command" functions). Note that this is different from the tasks scheduled using the Windows 2000 Task Scheduler. This class is only instrumented on Windows NT 4.0 and later. Each job scheduled against the schedule service is stored persistently (the scheduler will know to start the job even after a reboot) and is executed at the specified time and day of the week and/or month. If the computer is not active or if the scheduled service is not running at the specified job time the schedule service will run the specified job on the next day at the specified time. Scheduled jobs are scheduled with respect to Universal Coordinated Time (UTC), i.e. with bias offset from GMT. This means that a job can be specified using any time zone specification. The Win32_ScheduledJob class will return the local time with UTC offset when enumerating an object and convert to local time when creating new jobs. For example a job specified to run on a computer in Boston at 10:30 pm Monday PST time will be scheduled to run locally at 1:30am Tuesday EST. It should be noted that a client must take into account whether daylight savings time is in operation on the local computer and if so subtract a bias of 60 minutes from the UTC offset.
{'Description':'The Command parameter contains the name of the command, batch program, or binary file (along with command line parameters) that the schedule service will use to invoke the job.Example: defrag /q /f','In':True,'MappingStrings':['Win32API|Network Management Structures|AT_INFO|Command']}
StartTime
datetime
1
✓
-
{'Description':'The StartTime parameter represents the UTC time to run the job. This is of the form YYYYMMDDHHMMSS.MMMMMM(+-)OOO, where YYYYMMDD must be replaced by ********.Example: ********123000.000000-420 which implies 12:30 pm PST with daylight savings time in effect.','In':True,'MappingStrings':['Win32API|Network Management Structures|AT_ENUM|JobTime']}
RunRepeatedly
boolean
2
✓
-
{'Description':'The RunRepeatedly parameter indicates whether the scheduled job should run repeatedly on the days that the job is scheduled.Values: TRUE or FALSE. If TRUE, then the job is run repeatedly according to the DaysOfWeek and DaysOfMonth parameter. If no value is supplied the parameter defaults to FALSE.','In':True,'MappingStrings':['Win32API|Network Management Structures|AT_INFO|Flags|JOB_RUN_PERIODICALLY'],'Optional':True}
DaysOfWeek
uint32
3
✓
-
{'BitValues':['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],'Description':'The DaysOfWeek parameter indicates the days of the week when the job is scheduled to run, and is used only when the RunRepeatedly parameter is TRUE.','In':True,'MappingStrings':['Win32API|Network Management Structures|AT_INFO|DaysOfWeek'],'Optional':True}
DaysOfMonth
uint32
4
✓
-
{'BitValues':['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],'Description':'The DaysOfMonth parameter indicates the days of the month when the job is scheduled to run, and is used only when the RunRepeatedly parameter is TRUE.','In':True,'MappingStrings':['Win32API|Network Management Structures|AT_INFO|DaysOfMonth'],'Optional':True}
InteractWithDesktop
boolean
5
✓
-
{'Description':'The InteractWithDesktop parameter indicates whether the specified job should be interactive (meaning a user can give input to the scheduled job while it is executing).Values TRUE or FALSE. If TRUE, then the job will be interactive. The default value of this parameter is FALSE.','In':True,'MappingStrings':['Win32API|Network Management Structures|AT_INFO|Flags|JOB_NONINTERACTIVE'],'Optional':True}
JobId
uint32
6
-
✓
{'Description':'The JobId parameter indicates the identifier number of the job. This parameter is a handle to the job being scheduled on this computer.','MappingStrings':['Win32API|Network Management Structures|AT_ENUM|JobId'],'Out':True}
Constructor
True
Description
'The Create function submits a job to the operating system for execution at a specified future time and date. This function requires that the schedule service be started at the computer towhich the job is submitted. The method returns an integer value which can be interpretted as follows: 0 - Successful completion 1 - Not supported 2 - Access denied 8 - Unknown failure 9 - Path not found 21 - Invalid parameter 22 - Service not started Other - For integer values other than those listed above, refer to Win32 error code documentation.'
'The Delete method deletes a scheduled job. The method returns an integer value which can be interpretted as follows: 0 - Successful completion 1 - Not supported 2 - Access denied 8 - Unknown failure 9 - Path not found 21 - Invalid parameter 22 - Service not started Other - For integer values other than those listed above, refer to Win32 error code documentation.'
'The Command property contains the name of the command, batch program, or binary file (along with command line arguments) that the schedule service will use to invoke the job. Example: defrag /q /f'
'The InteractWithDesktop property allows the specified job to be interactive (meaning a user can give input to a scheduled job while it is executing). Values TRUE or FALSE. If TRUE, then the job will be interactive. If FALSE, then the job will not be interactive.'
'The RunRepeatedly property indicates whether the scheduled job should run repeatedly on the days that the job is scheduled. Values: TRUE or FALSE. If TRUE, then the job is run repeatedly. If FALSE, then the job is run once.'
'The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.'
'The StartTime property represents the UTC time to run the job, in the form of YYYYMMDDHHMMSS.MMMMMM(+-)OOO, where YYYYMMDD must be replaced by ********. The replacement is necessary because the scheduling service only allows jobs to be configured on a day of the month, day of the week, or run once. A job cannot be run on a specific date. Example: ********123000.000000-420 which implies 12:30 pm PST with daylight savings time in effect.'
'The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are "OK", "Degraded" and "Pred Fail". "Pred Fail" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are "Error", "Starting", "Stopping" and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither "OK" nor in one of the other states.'
'The Win32_ScheduledJob class represents a job scheduled using the network management schedule service functions (also known as "Job" and "AT command" functions). Note that this is different from the tasks scheduled using the Windows 2000 Task Scheduler. This class is only instrumented on Windows NT 4.0 and later. Each job scheduled against the schedule service is stored persistently (the scheduler will know to start the job even after a reboot) and is executed at the specified time and day of the week and/or month. If the computer is not active or if the scheduled service is not running at the specified job time the schedule service will run the specified job on the next day at the specified time. Scheduled jobs are scheduled with respect to Universal Coordinated Time (UTC), i.e. with bias offset from GMT. This means that a job can be specified using any time zone specification. The Win32_ScheduledJob class will return the local time with UTC offset when enumerating an object and convert to local time when creating new jobs. For example a job specified to run on a computer in Boston at 10:30 pm Monday PST time will be scheduled to run locally at 1:30am Tuesday EST. It should be noted that a client must take into account whether daylight savings time is in operation on the local computer and if so subtract a bias of 60 minutes from the UTC offset.'