Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Scope

  • Windows Task Scheduler® jobs can be migrated to JobScheduler.
  • SOS provides a PowerShell script that creates JobScheduler job configuration files from Windows Task Scheduler® jobs.

PowerShell Cmdlet

  • Download the PowerShell cmdlet: ConvertFrom-WindowsTaskScheduler.ps1
  • The PowerShell cmdlet can be used with Windows PowerShell FullCLR 5.1 and PowerShell CoreCLR 6.x and 7.x for Windows environments. It can be used for JobScheduler releases 1.12 and 1.13..

Name

ConvertFrom-WindowsTaskScheduler

SYNOPSIS

Converts jobs from Windows Task Scheduler to JobScheduler.

SYNTAX

ConvertFrom-WindowsTaskScheduler [[-TaskName] <String>] [[-TaskPath] <String>] [[-OutputDirectory] <String>] [[-Timezone] <String>]  [<CommonParameters>]

DESCRIPTION

The job configuration from Windows Task Scheduler is converted to XML job files that can be deployed to JobScheduler Master.

...

XML job file names are created from the Windows Task Scheduler folder paths and task names.

PARAMETERS

TaskName

-TaskName <String>

Specifies an individual job to be converted. Consider that job names are not unique with Windows Task Scheduler. When used with the -TaskPath parameter then a single job can be selected.

...

Required?false
Position?1
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

TaskPath

-TaskPath <String>

Specifies the path in the Windows Task Scheduler repository from which jobs should be converted.

...

Required?false
Position?2
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

OutputDirectory

-OutputDirectory <String>

...

Required?false
Position?3
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Timezone

-Timezone <String>

Accepts the name of a Joda time zone, see http://joda-time.sourceforge.net/timezones.html
The cmdlet does not convert dates according to this time zone, instead the specified time zone is added to the run-time settings of jobs. Consider that a JobScheduler Master might be operated in a time zone
that is different from the time zone that the Windows Task Scheduler is operated for.

Required?false
Position?4
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

...

Converts all jobs from any folders and writes the XML job files to the c:/tmp/jobs directory.
The specified Joda time zone is added to the run-time settings of converted jobs.

Limitations

  • Triggers for monthly job execution are not converted as there is no public API for this trigger type.
  • Actions of Windows Task Scheduler jobs are mapped to a single JobScheduler job script.
  • For cyclic jobs in JobScheduler repetitions have to occur within a 24 hours period. Windows Task Scheduler knows about repetitions that exceed this period.

...