Import Cron and Windows Task Scheduler
How to import a Cron or Windows Task Scheduler job by using the Dynamic Workload Console.
Before you begin
About this task
To manage your Cron or Windows Task Scheduler jobs in your HCL Workload Automation environment, complete the following steps:
Procedure
Results
The following example
shows a Windows Task Scheduler input definition
file:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2016-12-27T16:09:03.2293491</Date>
<Author>NX051050\Administrator</Author>
</RegistrationInfo>
<Triggers>
<TimeTrigger>
<StartBoundary>2016-12-27T16:08:33.47795</StartBoundary>
<Enabled>true</Enabled>
</TimeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>NC051050\Administrator</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>P3D</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\Users\Administrator\Desktop\wts.bat</Command>
</Exec>
</Actions>
</Task>
The following example
shows a Cron input definition file:
*/10 13 26 10 * echo hello world
Limitations
About this task
There are some limitations that do not permit the import of a Cron or Windows Task Scheduler job:
- Cron
- You can use commas only for the second, third, and fifth fields, indicating the hour and the day
of the month, respectively. In all other fields, you must use the dash (-) to indicate a range. For
example, a range from one to five must be specified as follows: 1-5. Consider the following example,
in which you specify that the job must run on the 30th day of each month once a minute, from 12;30
AM to 12;35 AM and from 12;30 PM to 12;35 PM:
30-35 0,12 30 * *
- The range-type syntax is not supported in the month field (penultimate) of the rule.
- In the last field of the rule, you can use a value between zero or seven and six only if in both the third and fourth field the value provided is *. In all other cases, the value of the last field must be *. The zero and seven values both indicate Sunday and can be used interchangeably.
- You can use commas only for the second, third, and fifth fields, indicating the hour and the day
of the month, respectively. In all other fields, you must use the dash (-) to indicate a range. For
example, a range from one to five must be specified as follows: 1-5. Consider the following example,
in which you specify that the job must run on the 30th day of each month once a minute, from 12;30
AM to 12;35 AM and from 12;30 PM to 12;35 PM:
- Windows Task Scheduler
- Operating-system dependent options are not supported.
- Triggers are supported only if based on a schedule. The related advanced settings are not supported.
- Only the Start a program action is supported.
- Conditions are not supported.
- Hidden rules are not supported.
- Rules configured for specific operating systems are not supported.
- Choosing the user account with which you run the task is supported.
- Specifying how often the task should run is not supported.
- Settings are supported only for the rule applied if the task already running. The option "Stop the existing instance" is not supported.