Re: Scheduled task onlogon monthly?
From: Dan (No_one_at_Home.com)
Date: 05/28/04
- Next message: Please reply to newsgroup.: "Re: Hyperthreading and XP.."
- Previous message: anonymous_at_discussions.microsoft.com: "Windows Media Player"
- In reply to: mscir: "Re: Scheduled task onlogon monthly?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 22:26:08 -0400
Mike,
I don't know of any site with info specific to scripting and
scheduled tasks. The best I can offer is a link to Windows
Script resources:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp
This page includes a link for a free download of Windows Script
documentation.
I'm a real novice when it comes to this scripting stuff. I've only done
some very
simple programs to facilitate some special scheduling needs.
Here's a little one that demonstrates the sleep function:
-----------------------------------------------------------------
Option Explicit
Dim currTime
currTime = Left(Time,4)
While currTime <> "5:30"
currTime = Left(Time,4)
WScript.Sleep 14000
Wend
-----------------------------------------------------------------
The 14000 equates to about 15 seconds. You could use a variation
of this combined with my other example to start your first app and
wait 2 minutes before starting the second app.
By the way, I use this one to keep my system from dropping back
into standby before my all of my scheduled jobs can run. In XP, when
waking up the system to run a job, the Task Scheduler will return the
system to the state in which it found it when a scheduled job completes.
There's a hack to the registry that would negate the need for the program,
but I never bothered to investigate it since this does what I need.
Hope this helps.
Dan
"mscir" <mscir@access4less.com.net.org.uk> wrote in message
news:10bcne7e8d8bc35@corp.supernews.com...
> Crafty Outlaw wrote:
>
> > Scott,
> >
> > You could do it with a very simple script file. The example below
> > will execute "CMD" (DOS Prompt) on day number 1. Just
> > change the day of the month and the app to whatever you want.
> >
> > Copy and paste into Notepad and save as a .vbs file. Then put it
> > in the Start Up folder for the applicable user.
> >
> > Option Explicit
> >
> > Dim shell
> >
> > ' This will run the app every month on the 1st
> > If day(Date) = 1 Then
> > Set shell = CreateObject("WScript.Shell")
> > shell.Run("CMD")
> > shell.AppActivate "CMD"
> > End If
> >
> > Let me know how it works out for you.
> > Dan
>
> Dan, that's a nice trick. Can you tell me how to read up on this? I want
> to run 2 different tasks every fifteen minutes, running the 2nd two
> minutes after the first. Are there good sites dealing with using .vbs
> for scheculed tasks that you might recommend?
>
> Thanks,
> Mike
>
- Next message: Please reply to newsgroup.: "Re: Hyperthreading and XP.."
- Previous message: anonymous_at_discussions.microsoft.com: "Windows Media Player"
- In reply to: mscir: "Re: Scheduled task onlogon monthly?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|