China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 21:40
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to implement batch processing to run a certain program at a certain time regularly View 2,093 Replies 4
Original Poster Posted 2006-12-21 09:32 ·  中国 江苏 苏州 电信
新手上路
Credits 12
Posts 4
Joined 2006-11-21 01:37
19-year member
UID 71178
Gender Male
From 江苏苏州
Status Offline
I want to create a batch file that automatically runs a certain program (for example: a.exe) every Wednesday, and does nothing on other days.

[ Last edited by namejm on 2006-12-22 at 10:26 PM ]
Floor 2 Posted 2006-12-21 09:41 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
请先明确这是一段关于创建批处理文件的内容,以下是翻译:

请将其命名为 autojob.bat
代码如下,复制它并粘贴到你的.txt文件中,然后将其重命名为上述名称!

@echo off echo

at 12:00 /every:thursday a.exe

@echo off
Floor 3 Posted 2006-12-21 11:37 ·  中国 江苏 苏州 电信
新手上路
Credits 12
Posts 4
Joined 2006-11-21 01:37
19-year member
UID 71178
Gender Male
From 江苏苏州
Status Offline
非常感谢!你太聪明了。我已经用“AT help”查看了AT命令的用法!但我对“AT every:date[,,]”感到困惑。顺便说一下,a.exe应该加上“ ”吧?
Floor 4 Posted 2006-12-21 11:40 ·  中国 河北 保定 联通
初级用户
Credits 21
Posts 28
Joined 2006-12-15 10:55
19-year member
UID 73612
Gender Female
Status Offline
Hehe, learned something, and uh
Floor 5 Posted 2006-12-23 11:25 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
Originally posted by zheng514 at 2006-12-20 22:37:
Thank you very much!You are so smart.I haved used "AT help" to review the usage of AT command!But I am confused about "AT every:date".By the way,a.exe should add " &quo ...


No "" is necessary, but you must type the absolute routine of an executable file , such as f:\a.exe

To sum up,

at 12:00 /every:monday,tuesday f:\a.exe

That is ok. No "" is necessary here.
Forum Jump: