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-09 19:03
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to write the DOS timing command (urgent waiting) View 3,489 Replies 25
Original Poster Posted 2007-06-27 09:44 ·  中国 云南 昆明 联通
初级用户
★★
Credits 182
Posts 88
Joined 2005-11-29 05:52
20-year member
UID 46146
Status Offline
I want to use DOS (preferably batch processing) to automatically close a program after half an hour of running, but I don't know how to implement the countdown of these half an hour with DOS commands (I don't want to use scheduled tasks). Which expert knows please give guidance, preferably with an example~~~
Floor 2 Posted 2007-06-27 09:57 ·  中国 广东 东莞 电信
初级用户
★★
Credits 136
Posts 73
Joined 2007-04-02 05:47
19-year member
UID 83685
Gender Male
Status Offline
I also really want to know. I think it should be using batch processing, obtaining the system time, and then judging conditions. But my batch processing knowledge is too poor.
Floor 3 Posted 2007-06-27 10:19 ·  中国 河北 保定 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
Just use a command-line program like sleep or wait to wait for half an hour.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 4 Posted 2007-06-27 22:50 ·  中国 广东 东莞 电信
初级用户
中国DOS联盟菜鸟
Credits 23
Posts 12
Joined 2007-06-13 18:35
19-year member
UID 91221
Gender Male
Status Offline
Climbing
Don't I give everyone an example?
Floor 5 Posted 2007-06-27 23:05 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Upload a sleep tool that serves the purpose of delaying.

The usage is very simple:
sleep 5s
means delay for 5 seconds (Seconds)

sleep 5m
means delay for 5 minutes (Minutes)

sleep 5h
means delay for 5 hours (Hours)

sleep 5d
means delay for 5 days (Days)
Attachments
sleep.rar (7.58 KiB, Credits to download 1 pts, Downloads: 101)
Floor 6 Posted 2007-06-28 12:24 ·  中国 云南 昆明 联通
初级用户
★★
Credits 182
Posts 88
Joined 2005-11-29 05:52
20-year member
UID 46146
Status Offline
Floor 7 Posted 2007-06-28 13:32 ·  中国 四川 资阳 电信
新手上路
Credits 2
Posts 1
Joined 2007-06-28 13:06
19-year member
UID 92578
Gender Male
Status Offline
Good stuff.. Collect.
Floor 8 Posted 2007-09-27 01:42 ·  中国 重庆 电信
中级用户
★★
Credits 235
Posts 109
Joined 2006-08-24 00:52
19-year member
UID 61161
Gender Male
Status Offline
Good stuff.. Collect.
Floor 9 Posted 2007-10-03 12:23 ·  中国 江苏 苏州 昆山市 电信
初级用户
★★
Credits 160
Posts 75
Joined 2006-06-28 01:07
20-year member
UID 57661
Gender Male
Status Offline
Floor 10 Posted 2007-10-03 16:53 ·  中国 江苏 南京 电信
初级用户
★★
Batchs上議院參議長
Credits 199
Posts 105
Joined 2007-06-05 12:00
19-year member
UID 90300
Gender Male
From 江苏
Status Offline
First method:
.........
.........
.........
..(The above code is omitted).....
ping /n 1799 127.1>nul 2>nul

Second method:

:: Sleep.bat - Sleep/Delay/Wait n seconds
:: Herbert Kleebauer(Germany) - 2005/05/29
:: Modified by Will Sort - 2005/06/02
@echo off
echo q | debug>nul
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>sleep.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>sleep.com
echo T}{z~~@GwkBG@OEKcUt`~}@MqqBsy?seHB~_Phxr?@zAB`LrPEyoDt@Cj?>>sleep.com
echo pky_jN@QEKpEt@ij?jySjN@REKpEt@jj?jyGjN@SEKkjtlGuNw?p@pjirz>>sleep.com
echo LFvAURQ?OYLTQ@@?~QCoOL~RDU@?aU?@{QOq?@}IKuNWpe~FpeQFwH?Vkk>>sleep.com
echo _GSqoCvH{OjeOSeIQRmA@KnEFB?p??mcjNne~B?M??QhetLBgBPHexh@e=>>sleep.com
echo EsOgwTLbLK?sFU`?LDOD@@K@xO?SUudA?_FKJ@N?KD@?UA??O}HCQOQ??R>>sleep.com
echo _OQOL?CLA?CEU?_FU?UAQ?UBD?LOC?ORO?UOL?UOD?OOI?UgL?LOR@YUO?>>sleep.com
echo dsmSQswDOR









Last edited by koala on 2007-10-3 at 05:01 PM ]
『生如夏花之绚烂
死若秋叶之静美』 dos做到了
Floor 11 Posted 2007-10-04 00:22 ·  中国 陕西 宝鸡 电信
初级用户
★★
Credits 116
Posts 67
Joined 2007-02-23 06:12
19-year member
UID 79993
Gender Male
Status Offline
Cultivate the good habit of respecting others' labor!
Floor 12 Posted 2007-10-04 23:06 ·  中国 上海 电信
新手上路
Credits 6
Posts 3
Joined 2007-10-04 22:06
18-year member
UID 98906
Gender Male
Status Offline
Admiring, admiring, really a master!
Floor 13 Posted 2007-10-05 14:24 ·  中国 浙江 温州 电信
初级用户
★★
Credits 158
Posts 89
Joined 2007-04-25 08:06
19-year member
UID 86402
Gender Male
Status Offline
Collected..!!!
Floor 14 Posted 2007-10-05 18:47 ·  中国 江西 南昌 电信
中级用户
★★
Credits 245
Posts 123
Joined 2007-06-08 09:04
19-year member
UID 90636
Gender Female
Status Offline
Floor 15 Posted 2007-11-19 05:08 ·  中国 上海 联通
新手上路
Credits 2
Posts 1
Joined 2007-11-18 21:51
18-year member
UID 103072
Gender Male
Status Offline
Forum Jump: