How to execute commands of batch file at timed intervals
I am using an acer aspire desktop installed with windows 7. I need to know how to execute commands of batch file at timed intervals. Because i want to execute certain commands after a certain interval of time this will. Have anybody needed this ever before i would really appreciate your help in this matter.
Re: How to execute commands of batch file at timed intervals
Yes this is possible but it would have been somewhat more better if you have also posted the program so that i can implement on that program and could have posted the solution but i am unable to give you a solution without the codes. I will do the needful as soon as you post the bat file commands.
Re: How to execute commands of batch file at timed intervals
For this you will have to make use of a loop and then execute the batch file it would be better if you also make use of the 'dir' command after about 30 seconds. Since this dir command is used very extensively when a user wants to run certain command at a certain time intervals hope you got the point.
Re: How to execute commands of batch file at timed intervals
To perceive this i will suggest you to make use of the scheduled task. Since using the scheduled task you can repeat certain number of commands at frequent intervals. So simply go to the start menu and then click programs and select accessories and select the scheduled task. double click the add scheduled tab.
Re: How to execute commands of batch file at timed intervals
I think you will have to place the batch file in to a loop and then execute the dir command after every 25 secs. This will help you to execute certain command after a certain interval of time. If you are not getting it still then try to concentrate on the program mentioned below.
- START
- REM (this will execute the MS-DOS dir after every 25 seconds)
- dir
- SLEEP 25
- GOTO END
Re: How to execute commands of batch file at timed intervals
I would like to give you an example which will help you to understand how to implement such programs try to go through the program below.
:run_batch
taskkill avg.exe
REM
sleep 30 (will pause the process for 30 seconds)
goto run_batch
I hope that this would have solved all your issue.