Adam Najmanowicz @adamnaj helped by providing one out-of-the-box way to accomplish the task. The short answer is to use the Task Manager. Have a look under Sitecore -> PowerShell Toolbox -> Task Manager
You are then presented with a delightful screen which provides you with options like Execute Now and Edit Schedule.
Michael West @michaelwest101 also had a good suggestion. Oh wait, that was me :)
This solution creates a context menu item that can be made visible when selecting an item with the Schedule template.
What we'll do here is create a new PowerShell Script item called Run Task, set a rule on it to only appear for the Schedule template, and write some simple code to run the task:
$item = Get-Item -Path . if($item) { $schedule = Get-TaskSchedule -Item $item Start-TaskSchedule -Schedule $schedule }
You can also confirm that the scheduled task completed successfully by checking the Log Viewer.
John West @sitecorejohn (coincidentally with the same last name) did provide a detailed article on an approach that does not the module.
Paul Martin @sitecorepm also provided details to a module that provides an alternative experience to the schedule editor.
I hope this helps someone.
// Michael
No comments:
Post a Comment