There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot browser bsod computer crash css dell desktop driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware help please hijackthis hjt hjt log install internet internet explorer itunes javascript keyboard laptop log malware monitor network networking openoffice outlook outlook 2003 outlook express password popups problem router seo slow sound sp3 spyware startup trojan usb video virtumonde virus vista vundo windows windows xp winxp wireless youtube
DOS/PDA/Other
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
execute a batch files


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
vinod.bhanur's Avatar
Computer Specs
Junior Member with 9 posts.
 
Join Date: May 2008
Experience: Beginner
04-May-2008, 09:07 AM #1
execute a batch files
hello friends. this is vinod.

my problem is to execute a batch file after every 15 minutes in windows.

please help me out to archive this task.

THANK YOU in advance.
devil_himself's Avatar
Distinguished Member with 4,794 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
04-May-2008, 09:47 AM #2
How To Schedule Tasks in Windows XP
http://support.microsoft.com/kb/308569
vinod.bhanur's Avatar
Computer Specs
Junior Member with 9 posts.
 
Join Date: May 2008
Experience: Beginner
04-May-2008, 11:08 AM #3
is there any code to write to execute a batch file for every 15 min in windows.

main problem is i wrote a set of command in text file and named it as "vinod.bat" as a result vinod batch file is created.So i want the set of commands to be executed for every 15 min and write the result of the commands to a file.

how can i do this .in how many ways i can do this. i tried by scheduling the task at every time i login to the system but its not working. plz suggest . THANK YOU.
devil_himself's Avatar
Distinguished Member with 4,794 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
04-May-2008, 11:21 AM #4
Is Your Script Working Correctly .. Post A Copy Of Your Script !

SCHTASKS - http://www.ss64.com/nt/schtasks.html
TheOutcaste's Avatar
Computer Specs
Senior Member with 1,538 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
04-May-2008, 03:45 PM #5
Control Panel | Scheduled Tasks | Add Scheduled Task
Browse to your batch file
Set to run Daily
Set start time. If you want it to run on every quarter hour, 24 hours a day, pick the next hour and set the minutes to zero. If you just need it to run during work hours, set the hour to the time you want it to first run each day
Set for everyday, weekdays, or every X number of days
Give it a username and password to run with
Check the box to open advanced properties before you click finish

When the Properties box opens, click the Schedule tab then the advanced Button
Check Repeat Task, then set to every 15 minutes
If it's to Run 24 hours a day, set Duration to 24 hours, otherwise set it to how long each day, say 9 hours for an 8 hour workday with 1 hour lunch, or specify the time it's to stop each day.

Of course, the batch file must be working first

HTH

Jerry
__________________
Of course I know all the answers ; I just don't always match the answers to the right questions

Warning -- Windows spoken here. (Rated R for Strong Language and Violence -- When your Windows PC flies through a window, that's violent, right?)
vinod.bhanur's Avatar
Computer Specs
Junior Member with 9 posts.
 
Join Date: May 2008
Experience: Beginner
05-May-2008, 08:20 PM #6
batche file execution from other dirctory
hello first of all i thank all the members for giving me a solution. i completed my task by scheduling my task executing for every 15 mins.

My another problem is i want to execute a batch file from another directory.

In Detail: my batch file is in c:\ for suppose it consists of set of cmds for execution . and i want to execute this batch file from d:\ in command prompt. so what cmds should i write in my batch file in order to execute from d drive. i hope u understood my question. for more clarity please post ...


THANK YOU.
Squashman's Avatar
Distinguished Member with 12,328 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
05-May-2008, 10:33 PM #7
Type the full path to the batch file. If you are at the D: drive and what to execute a batch file on the C: drive.

D:\>c:\foldername\batchfile.bat
vinod.bhanur's Avatar
Computer Specs
Junior Member with 9 posts.
 
Join Date: May 2008
Experience: Beginner
06-May-2008, 11:14 PM #8
thank you for ur advice..
vinod.bhanur's Avatar
Computer Specs
Junior Member with 9 posts.
 
Join Date: May 2008
Experience: Beginner
06-May-2008, 11:34 PM #9
one more question is . As my batch file executed the out put of the commands are written into the files names as temp.txt. Each time it is executing and the out of the batch file is appending to that text file which i specified in the batch file . I want to write the out put of the batch file to the new file every time it is executed.How can i do this one and remove the older text file.
devil_himself's Avatar
Distinguished Member with 4,794 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
06-May-2008, 11:48 PM #10
add this line at the top

if exist temp.txt del temp.txt
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:26 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.