-1

I have one selenium webdriver script and another powershell script. I want to configure both scripts to run on each thursday at 6 pm. How to achieve that.

Mike
  • 1
  • 2

2 Answers2

1

Create a Windows Scheduled task to run a PowerShell script.

Here is the step by step guide on how to do that.

Use-the-windows-task-scheduler-to-run-a-windows-powershell-script

Then just schedule the script according to your timelines.

If you want to configure the scheduled task also using PS, then here is my blog to help you out on that.

PS Scheduled Task Script

Alternative,

Creation of Task Scheduler Script using cmdlets:

powershell create scheduled-tasks

Hope it helps.

Ranadip Dutta
  • 8,857
  • 3
  • 29
  • 45
0

Not sure about Selenium (don't know what that is), but PowerShell scripts can be scheduled using the regular Windows Task Scheduler.

Scheduled tasks can be manually created using the Windows Task Scheduler (taskschd.msc), or via the command-line using schtasks.exe, e.g.:

schtasks.exe /Create /sc weekly /d THU /st 18:00 /tn MyPowerShellJob /tr "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -file d:\MyScript.ps1 \"hello world\" foo" /ru JohnDoe /rp
Simon Catlin
  • 2,141
  • 1
  • 13
  • 15