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-11 22:43
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Batch processing timing program (without task scheduler) View 1,657 Replies 11
Original Poster Posted 2009-05-07 04:21 ·  中国 湖北 十堰 电信
初级用户
Credits 21
Posts 18
Joined 2006-09-18 14:54
19-year member
UID 62969
Status Offline
Can batch processing write timing programs? Not the kind of scheduled tasks, etc. Just use batch processing commands to complete.
Looking forward to experts...
Floor 2 Posted 2009-05-07 15:23 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
What you mentioned about the timing program, others simply don't know. Please explain its uses and functions, etc.

[ Last edited by yishanju on 2009-5-7 at 15:28 ]

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 3 Posted 2009-05-07 23:14 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Floor 4 Posted 2009-05-09 10:58 ·  中国 湖北 十堰 电信
初级用户
Credits 21
Posts 18
Joined 2006-09-18 14:54
19-year member
UID 62969
Status Offline
Moderator, do you have any tips, please teach me?
Floor 5 Posted 2009-05-09 11:00 ·  中国 湖北 十堰 电信
初级用户
Credits 21
Posts 18
Joined 2006-09-18 14:54
19-year member
UID 62969
Status Offline
Second floor: The timing program I mentioned has two functions. One is that a specified program runs once every hour after each boot. The second is that for a computer that is not turned on or off for 24 hours, a specified program runs at 9 am every day.
Floor 6 Posted 2009-05-09 11:39 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Why didn't you make it clear on the top floor?
Floor 7 Posted 2009-05-09 22:24 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
It is completely appropriate to set up a task plan to achieve it. If not, it's too unjust. There are also other methods.

1, Throw the batch file into the startup items, and write the code like this:
ping -n 3600 127.1>nul
start 程序.exe

2, The batch file always keeps running, continuously checking whether %time% is equal to 9:00 in the morning.

[ Last edited by yishanju on 2009-5-9 at 22:31 ]

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 8 Posted 2009-05-10 01:49 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
re Above:
Who would dare to use a computer where the CPU is always at 100% like that?!

re Poster:
Why not use a scheduled task? Are you afraid others will find out? If you use a third-party tool, you'll also see it in the process.
If you want it not to be seen in the process, that's definitely a sophisticated virus technique. If that's the case, you'd better figure it out yourself, poster.
精简
=> 个人网志
Floor 9 Posted 2009-05-10 20:03 ·  中国 山东 潍坊 电信
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
How is it possible to make the CPU always be at 100%.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 10 Posted 2009-05-10 21:05 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
Tried it, really don't know.
It turns out that the ping latency is different from other commands, learned
精简
=> 个人网志
Floor 11 Posted 2009-05-11 05:53 ·  中国 湖北 十堰 电信
初级用户
Credits 21
Posts 18
Joined 2006-09-18 14:54
19-year member
UID 62969
Status Offline
Great experts, I'm sorry. Is there any completed one for me to refer to? I've just started learning.
Floor 12 Posted 2009-05-11 12:06 ·  中国 河南 郑州 联通
新手上路
Credits 18
Posts 20
Joined 2008-10-28 22:45
17-year member
UID 129408
Gender Male
Status Offline
Just give a general idea. Just like yishanju said, put it in the startup items. I wrote this according to the mode of running for no more than two days. Change "echo start frist" to the program that needs to run the first time, and change "echo start second" to the program that needs to run the second time.

Personally, I think you'd better use vbs to achieve the effect you want, because that's better, at least the window can be hidden.




@echo off
::for /f "skip=3 tokens=4* delims= " %%i in ( 'net statistics workstation' ) do set timestart=%%i
set timestart=%time%
set timestartH=%timestart:~0,2%
set timestartF=%timestart:~3,2%
echo The computer was powered on at %timestart%
::echo %timestartH%
::echo %timeStartF%
set count=0
:loop

ping 127.1 /n 3600 >nul
set /a count=%count%+1
if %count% equ 1 goto startFrist
if %count% geq 24 goto startSecond
goto loop

:startFrist
echo start frist
goto loop

:startSecond
:loopH
set timecheckH=%time:~0,2%
ping 127.1 /n 60 >nul
if %timecheckH% geq 9 goto startTwo
:startTwo
echo start second
exit

pause


[ Last edited by wishpopo on 2009-5-12 at 10:15 ]
Forum Jump: