如何从 Windows 任务调度程序 (ubuntu bash windows 10) 上运行程序

ami*_*far 4 windows bash ubuntu taskscheduler windows-subsystem-for-linux

我需要在 ubuntu bash 中每 5 分钟执行一次任务,我喜欢使用 Windows 任务调度程序。我不知道如何编写 .bat 文件以在 ubuntu bash 中启动应用程序。我测试了这些并没有奏效。c:\Windows\System32\bash.exe -l [程序名称参数]

ami*_*far 7

可以在 ubuntu bash 上运行命令,在 args 中添加 -c 标志

c:\Windows\System32\bash.exe -c <command>
Run Code Online (Sandbox Code Playgroud)

并将其写入 .bat 文件,然后添加到 Windows 任务调度程序。