?
Solved

Batch file: Run each 5 minutes

Posted on 2011-09-18
3
Medium Priority
?
414 Views
Last Modified: 2012-05-12
I want to write a batch file to run each 5 minutes
0
Comment
Question by:egovernment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Expert Comment

by:KOTiS
ID: 36556033
If you are running MS-DOS under Windows the you can create a schedule to run the batch file. If your only OS is MS-DOS then there are some resident programs. What is your OS?
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 2000 total points
ID: 36556074
Yes you can either schedule it using task scheduler like has been said, or you can run one batch that pauses for 5 minutes (ish), either using a third party util, or a "PING" command, e.g.:

@echo off
:loop
echo Do the things you want here.  It is %time%
for /l %%a in (5,-1,1) do (
  echo Waiting for %%a for minutes....
  ping -n 61 -w 1000 127.0.0.1 >NUL 2>&1
)
echo Running again now
goto :loop
And call that "Yourbatch.cmd" or whatever.

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 36934968
Thanks.  What did you end up doing?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question