CHAPTER 12

image

PowerShell Jobs

In this chapter, we will discuss PowerShell’s batch-job execution features, which are implemented in the form of cmdlets. At its simplest, we have the ability to run a script as a background job. However, this requires that the PowerShell session that submitted the job remains active. To avoid this constraint, we can create a scheduled job. PowerShell has a number of cmdlets to support job scheduling. As we will see, these cmdlets are really an interface to the Windows Task Scheduler. We will discuss the cmdlets that support the three components of a scheduled job: the job definition, triggers, and options. The job ...

Get Pro PowerShell for Database Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.