Computing.Net > Forums > Windows XP > Set a .bat to run at a certain time

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Set a .bat to run at a certain time

Reply to Message Icon

Name: tyrion81
Date: November 19, 2008 at 11:15:26 Pacific
OS: XP
CPU/Ram: Pentium 4 3.20 2 GB
Product: MPS
Comment:

I need a batch file to run at a certain time, after I leave work. I can't use scheduled tasks because they are disabled by GPO. Any ideas of a way around this? I was thinking of using a VBScript but my VB is not very good and wouldn't even know where to start. Thanks in advance for the help.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: November 19, 2008 at 19:12:48 Pacific
Reply:

This is hokey, but may fill the bill.


=====================================
@echo off & setLocal EnableDelayedExpansion

:loop

echo !TIME! | find "17:00" > nul
if not errorlevel 1 echo run my app
ping -n 1 1.1.1.1 -w 6000000 > nul
goto :loop


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: tyrion81
Date: November 20, 2008 at 09:37:38 Pacific
Reply:

Thanks M2, but I managed to come up with a very basic VBscript after some research yesterday. I figured I'd come and post it in case it could
help someone else out.

set oShell = createobject("Wscript.shell)

WScript.Sleep 5000
oshell.Run "cmd.exe /C \\mybatch.bat"

The time is automatically in milliseconds unfortunetly. But it works.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Set a .bat to run at a certain time

.bat to shutdown un-logged on PC's www.computing.net/answers/windows-xp/bat-to-shutdown-unlogged-on-pcs/167323.html

CPU not running at full clock speed www.computing.net/answers/windows-xp/cpu-not-running-at-full-clock-speed/54645.html

2.2 running at 1.7 www.computing.net/answers/windows-xp/22-running-at-17/57557.html