How it works...
The PowerShell implementation of crontab is technically a wrapper, which encapsulates the crontab commands that work in Linux. Why use PowerShell to schedule jobs if the underlying functions are that of crontab? The reason would be the uniformity of usage, the consistency, and the object-oriented approach. If you know how to use PowerShell, that is all you need in order to be able to use crontab as well. That is the goal.
The New-CronTab cmdlet is used to define new tasks. The parameters available define the frequency with which the tasks are to be executed. The Cron jobs are executed with the same privileges as with which the New-CronTab cmdlet was executed. In other words, if you launched PowerShell as a super-user and ran ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access