Mandy wrote:
> Is it possible to create a task which will run on an hourly
> basis? I would hate to create 24 tasks.
>
> In order to get close without using 24, I currently use:
> AT 07:00 /every:M,T,W,Th,F,S,Su "doThis\rightHere.vbs"
> AT 08:00 /every:M,T,W,Th,F,S,Su "doThis\rightHere.vbs"
> AT 11:00 /every:M,T,W,Th,F,S,Su "doThis\rightHere.vbs"
> AT 12:00 /every:M,T,W,Th,F,S,Su "doThis\rightHere.vbs"
> AT 16:00 /every:M,T,W,Th,F,S,Su "doThis\rightHere.vbs"
> AT 16:45 /every:M,T,W,Th,F,S,Su "doThis\rightHere.vbs"
> AT 23:00 /every:M,T,W,Th,F,S,Su "doThis\rightHere.vbs"
>
> I need to use a non-wizard means to create this task, as it's
> to be done via script.
I like the free att.exe from Frank P. Westlkae for such purposes.
http://gearbox.maem.umr.edu/fwu/
Att.exe schedules itself to generate the next interval.
> It would also be helpful to have a simple (and scriptable) way to
> delete the task as needed, without knowing the task ID.
>
You will have to identify the job somehow. At (or ATT) without
arguments list current jobs, use find/findstr to filter by
name/program and parse this output with a for loop.
Provided you sched. your above script with
ATT +1m /r:h cscript /NOLOGO "doThis\rightHere.vbs"
You may delete the schedule at the command line with
for /f "tokens=5" %A in ('att^|find "doThis\rightHere.vbs"') do @att /d %A
or from a batch
@echo off
for /f "tokens=5" %%A in (
'att^|find "doThis\rightHere.vbs"'
) do @att /d %A
HTH
--
Gruesse Greetings Saludos Saluti Salutations
Matthias
---------+---------+---------+---------+---------+---------+---------+