We have been scheduling SharePoint on-prem Powershell scripts using Windows Task Scheduler to run at a specific time
But how do i schedule a SharePoint Online Powershell?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Azure Automation is an option if you're looking to run scripts directly in the cloud.
Simply create a runbook for your powershell script, and setup a schedule.
We can use the same technique windows task scheduler job for SharePoint online the way we used to in SharePoint On-Premise. The only notable thing is - the account what you are configuring in Windows task scheduler to run the script should not be MFA enabled and the script must be developed in PowerShell CSOM or PnP.