Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 4.0 » Register-ScheduledJob

Register-ScheduledJob - Powershell 4.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Register-ScheduledJob

Short description
Creates a new scheduled job.

Syntax


Description
The Register-ScheduledJob cmdlet creates scheduled jobs on the local computer.


A "scheduled job" is a Windows PowerShell background job that can be started automatically on a one-time or recurring 
schedule. Scheduled jobs are stored on disk and registered in Task Scheduler, so they can be managed in Task Scheduler 
or by using the Scheduled Job cmdlets in Windows PowerShell.


When a scheduled job starts, it creates an "instance" of the scheduled job. Scheduled job instances are identical to 
Windows PowerShell background jobs, except that the results are saved on disk. Use the Job cmdlets, such as Start-Job, 
Get-Job, and Receive-Job to start, view, and get the results of the job instances.


Use Register-ScheduledJob to create a new scheduled job. To specify the commands that the scheduled job runs, use the 
ScriptBlock parameter; to specify a script that the job runs, use the FilePath parameter.


Windows PowerShell scheduled jobs use the same job triggers and job options that Task Scheduler uses for scheduled 
tasks.


The Trigger parameter of Register-ScheduledJob adds one or more job triggers that start the job. The Trigger parameter 
is optional, so you can add triggers when you create the scheduled job, add job triggers later, add the RunNow 
parameter to start the job immediately, use the Start-Job cmdlet to start the job immediately at any time, or save the 
untriggered scheduled job as a template for other jobs.


The Options parameter lets you customize the options settings for the scheduled job. The Options parameter is also 
optional, so you can set job options when you create the scheduled job or change them at any time. Because job option 
settings can prevent the scheduled job from running, review the job options and set them carefully.


Register-ScheduledJob is one of a collection of job scheduling cmdlets in the PSScheduledJob module that is included 
in Windows PowerShell.


For more information about Scheduled Jobs, see the About topics in the PSScheduledJob module. Import the 
PSScheduledJob module and then type: Get-Help about_Scheduled* or see about_Scheduled_Jobs.


This cmdlet is introduced in Windows PowerShell 3.0.