Link to home
Start Free TrialLog in
Avatar of zeinth
zeinthFlag for United States of America

asked on

Batch Script

I like to write a  window batch script that will run  after every hour.
Suppose the name of my batch script is : st.bat,  and script  is in my machine's C:\ drive
Avatar of Roshan Mohammed
Roshan Mohammed
Flag of New Zealand image

1) What is the script intended to do, i mean what do you want to acheive
2) once the script is complete, you can use the windows scheduler to  to run the script every hour.

Thanks
S00007359
Avatar of zeinth

ASKER

I doubt that through window scheduler  tool we can run script for every hour for Indefinite period.
.
Windows scheduler is intented Exactly for Your task. And it has all needed options to precise control over the job execution time. It's true,  just try.
SOLUTION
Avatar of chatxfalcon
chatxfalcon
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can doubt it, but I've run a script every 5 minutes for the last 2 years on one server - it updates MRTG to show a graph of my internet throughput.  I use Scheduled Tasks.  And it's still running.  Is that "indefinite" enough?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zeinth

ASKER

I got below solution from net, I think this script will work for me:
schtasks /create /sc minute /mo 20 /tn "Security Script" /tr \\central\data\scripts\task.bat
thanks all
If you have a solution, you may close this question. You can acceppt your own comment as your solution if that's the case.
Thank you.

Kind regards.