Re: Scheduled task onlogon monthly?

From: Dan (No_one_at_Home.com)
Date: 05/28/04


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
>



Relevant Pages

  • Re: PHP time monitor
    ... that could be solved with logging, but I haven't attempted it yet so I'm ... I had originally envisioned the idea that a script would ... certain time was reached the script would execute. ... > Scheduling is better done with OS-level scheduling facilities such ...
    (alt.php)
  • Re: Schedule Task
    ... I do it with my own server and with my clients' ... here is a sample script. ... Echo Hard Disk Defragmentation Report for %DateDay% ... if you're asking "Can the scheduling be DYNAMIC and start at ...
    (microsoft.public.windows.server.sbs)
  • [ANN] Script Timer 2.4 Released
    ... Script Timer is a user friendly script, Automator workflow, and ... scheduling, independent Automator workflow scheduling, and other ... Script Timer lets you schedule the execution of AppleScript, perl, and ...
    (comp.sys.mac.system)
  • Re: Scripting for cleanup utilities run by Task Scheduler on logge
    ... You can delete any file while the user is logged off by scheduling ... > OK, I will consider your warnings on defrag, I've seen debates on its ... > The other part of my script is intended to delete temp files using the ... >> defrag operation then you might lose your whole disk. ...
    (microsoft.public.win2000.general)
  • Re: Windows: Scheduled Ruby script wont run
    ... I have a ruby script that I am scheduling at ... Also, if for some reason, you don't trust the Windows ...
    (comp.lang.ruby)