![](/img/trans.png)
[英]How to configure a VSCode Task to run a powershell script in the integrated terminal
[英]How to configure selenium webdriver script and powershell script to run once in a week
我有一個 selenium webdriver 腳本和另一個 powershell 腳本。 我想將這兩個腳本配置為在每個星期四下午 6 點運行。 如何實現。
創建 Windows 計划任務以運行 PowerShell 腳本。
這是有關如何執行此操作的分步指南。
使用windows-task-scheduler-to-run-a-windows-powershell-script
然后只需根據您的時間表安排腳本。
如果您還想使用 PS 配置計划任務,那么這里是我的博客,可以幫助您解決這個問題。
選擇,
使用 cmdlet 創建任務計划程序腳本:
希望能幫助到你。
不確定 Selenium(不知道那是什么),但是可以使用常規的 Windows 任務計划程序來安排 PowerShell 腳本。
可以使用 Windows 任務計划程序 (taskschd.msc) 或通過命令行使用 schtasks.exe 手動創建計划任務,例如:
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.