**请问下,如何修改调试,定时任务设定,以下2中方法,都未能成功运行test.bat?
双击脚本可以运行:
@echo off
rem---contents are not displayed
rem -------to create a number of files
rem -------syntax: FOR %%variable IN (set) DO command
:: --------syntax: FOR /L %%variable IN (start,step,end) DO command
for /L %%n in (1,1,20) do cd.>%%n.sas
echo the files are created
- 1.windows自带的定时任务功能。
进入计算机管理(此电脑右键“管理”),在系统工具->任务计划程序->任务计划程序库中能看到你电脑所有的定时任务,右键可以创建任务成功,但是后台并没有运行test.bat
2.schtasks /create /tn "My Bat Task" /tr "D:\mydos_bat\test.bat" /sc daily /st 10:52:00 /ed 2019/05/30
cmd 不管在个人user/adminstor ,test.bat下面都不可以自动运行