Sitecore schedulers with Powershell
- Nov 9, 2023
- 1 min read
PowerShell is Sitecore’s close friend, I’ve really loved doing things on Sitecore with PowerShell. We’d see how Sitecore scheduled tasks.
Almost all kind of item manipulations are possible using PowerShell, and below is an example where PowerShell helps set up a scheduler to perform item manipulations.
Things needed to be implementated -
Script item
Task item
Create the script item:
This is your PowerShell store on the content tree - /sitecore/system/Modules/PowerShell/Script Library
Create a folder for your script under /sitecore/system/Modules/PowerShell/Script Library.
Create your PowerShell Script (/sitecore/templates/Modules/PowerShell Console/PowerShell Script) item in the folder.
In the script body field of the created PowerShell script item, input your item manipulation script.
Create the task item:
Create a task item under the task definition folders /sitecore/system/Tasks/Schedules/
On the “items” field of the Schedule item, point your Powershell script item.
And, in the “Schedule field”, define your schedule. For example: 20230228T100000|21001231T100000|127|1:00:00 (Once a day everyday)
Comments