|
zxxhwlkj
初级用户
 
积分 21
发帖 18
注册 2006-9-18
状态 离线
|
『楼 主』:
批处理定时程序(不要计划任务)
使用 LLM 解释/回答一下
批处理可以写定时程序吗?不是计划任务之类的呀,只用批处理命令来完成。
期待高手。。。
Can batch processing write timing programs? Not the kind of scheduled tasks, etc. Just use batch processing commands to complete.
Looking forward to experts...
|
|
2009-5-7 04:21 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
你所说定时程序是什么东西别人跟本不知道
说一下用途和功能之类的。
Last edited by yishanju on 2009-5-7 at 15:28 ]
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 |
|
2009-5-7 15:23 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
|
2009-5-7 23:14 |
|
|
zxxhwlkj
初级用户
 
积分 21
发帖 18
注册 2006-9-18
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
版主,有什么高招,教教我?
Moderator, do you have any tips, please teach me?
|
|
2009-5-9 10:58 |
|
|
zxxhwlkj
初级用户
 
积分 21
发帖 18
注册 2006-9-18
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
二楼:我说的定时程序是两个功能,一是每次开机后1小时运行一次指定程序,二是如果24小时不开关机的电脑,每天的上午9点运行指定程序。
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.
|
|
2009-5-9 11:00 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 6 楼』:
Re 5楼
使用 LLM 解释/回答一下
你为啥不在顶楼说清楚呢?
Why didn't you make it clear on the top floor?
|

 |
|
2009-5-9 11:39 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
完全应该设置任务计划来实现了
不用的话,太没天理了。
其它方法也是有的。
1, 把批处理扔到启动项中,代码这样写:
ping -n 3600 127.1>nul
start 程序.exe
2, 批处理一直保持运行,不停检查%time% 是不是等于早上九点。
Last edited by yishanju on 2009-5-9 at 22:31 ]
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 |
|
2009-5-9 22:24 |
|
|
netbenton
银牌会员
     批处理编程迷
积分 1916
发帖 752
注册 2008-12-28 来自 广西
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
re 楼上:
那样cpu 一直都100%的电脑谁还敢用呢?!
re 楼主:
为什么不能用计划任务呢?怕别人知道吗?如果用三方,也会在进程中看到,
如果要进程中都看不到,那绝对是高深病毒的手法。如果是这样,还是楼主自己想办法搞定吧。
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.
|

精简
=> 个人 网志  |
|
2009-5-10 01:49 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
怎么可能会让CPU一直会100%。
How is it possible to make the CPU always be at 100%.
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2009-5-10 20:03 |
|
|
netbenton
银牌会员
     批处理编程迷
积分 1916
发帖 752
注册 2008-12-28 来自 广西
状态 离线
|
『第 10 楼』:
re 楼上
使用 LLM 解释/回答一下
试了一下,确实不会,
原来ping 延时与其它的命令不同哦,学习了
Tried it, really don't know.
It turns out that the ping latency is different from other commands, learned
|

精简
=> 个人 网志  |
|
2009-5-10 21:05 |
|
|
zxxhwlkj
初级用户
 
积分 21
发帖 18
注册 2006-9-18
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
大侠们,对不起,有没有写好的参考一下.我才刚学.
Great experts, I'm sorry. Is there any completed one for me to refer to? I've just started learning.
|
|
2009-5-11 05:53 |
|
|
wishpopo
新手上路

积分 18
发帖 20
注册 2008-10-28
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
给你个大概模样。就像 yishanju 说的那样放在开机启动项里面 这个我按照运行不超过两天的模式写的 将echo start frist 改成第一次要运行的程序 echo start second 改成第二次要运行的程序。
个人认为,你最好是用vbs去实现你要达到的效果,那样更好些,最少可以把窗口给隐藏。
@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 计算机开机于 %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 ]
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 ]
|
|
2009-5-11 12:06 |
|