如何从Windows Task Scheduler在(ubuntu bash Windows 10)上运行程序

如何从Windows Task Scheduler在(ubuntu bash Windows 10)上运行程序

问题描述:

我需要在ubuntu bash中每5分钟执行一次任务,我喜欢使用Windows Task Scheduler.我不知道如何编写.bat文件以在ubuntu bash中启动应用程序.我测试了这些,但是没有用.c:\ Windows \ System32 \ bash.exe -l [program_name args]

I need to execute task every 5 minute in ubuntu bash and I like to use windows task scheduler. I don't know how to write a .bat file to start application in ubuntu bash. I tested these and did not work. c:\Windows\System32\bash.exe -l [program_name args]

可以在args中使用add -c标志在ubuntu bash上运行命令

can run command on ubuntu bash with add -c flag in args

c:\Windows\System32\bash.exe -c <command>

并将其写入.bat文件,然后添加到Windows Task Scheduler.

and write it in .bat file and then add to windows task scheduler.