concept schedule job in category powershell

appears as: scheduled job, scheduled jobs, A scheduled job, scheduled job, scheduled jobs
Windows PowerShell in Action, Third Edition

This is an excerpt from Manning's book Windows PowerShell in Action, Third Edition.

Scheduled jobs are different from scheduled tasks. A scheduled job runs a PowerShell job on a trigger activated by the Windows Task Scheduler. A scheduled task runs a script, or command, on activation of a Windows Task Scheduler trigger.

The major difference between scheduled jobs and the jobs discussed in the previous sections is that a scheduled job survives the closure of the PowerShell console, but a regular job doesn’t. A scheduled job will continue to exist and run, according to its schedule, until it’s disabled or deleted. You can manage the job objects produced by a scheduled job with the standard job cmdlets.

PowerShell in Depth, Second Edition

This is an excerpt from Manning's book PowerShell in Depth, Second Edition.

PowerShell v3 introduced a new feature called updatable help. This is a great feature that has, unfortunately, led to a lot of confusion and gnashing of teeth. For a number of reasons, both technical and nontechnical, Microsoft doesn’t include any of PowerShell’s help files with PowerShell itself. Instead, you must download and install those help files on any computer where you’ll want to read them. To do so, run Update-Help. The command can even download updated help for non-Microsoft shell extensions that have been designed to take advantage of this feature. You should also set yourself a reminder to run it every month or so in order to have the most recent help files on your system, possibly as a scheduled job using another feature introduced in PowerShell v3 (see chapter 11). You can also subscribe to an RSS feed at http://sxp.microsoft.com/feeds/msdntn/PowerShellHelpVersions that will provide information when new versions of the help files are made available. If you don’t download help, you’ll be prompted to do so the first time you use the Get-Help cmdlet.

Scheduled jobs are a kind of hybrid entity introduced with PowerShell v3.

11.3.3. Managing scheduled jobs

A number of cmdlets are available for managing scheduled jobs. Note that these apply only to the scheduled entity; they don’t work with the results of jobs that have already run. First up are commands that deal with triggers:

It’s possible to run a scheduled job on demand:

PS C:\> Start-Job –DefinitionName DailyRestart

Just give the scheduled job’s name (which is its definition name), and the job will begin immediately. Even though you can see the scheduled job in the Task Scheduler, we recommend using PowerShell to manually run it.

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest