scheduling jobs every 25 days.

S

Steve Forman

I would like to schedule a job to run every 25 days. In UNIX, you can
specify:
at now + 25 days "command"
and it will run in 25 days.
However, the Windows AT Scheduler does not support this syntax.
I know it can be done in the Task Scheduler GUI, but that requires a
password to run, and because the password will change every 25 days,
it can't be run from there without also remembering to change the
password of the job which was used to schedule it.
So, does anybody know of a command line utility which will allow me to
schedule a job every 25 days?
Any help would be greatly appreciated.
Thanks.
 
P

Pegasus \(MVP\)

Steve Forman said:
I would like to schedule a job to run every 25 days. In UNIX, you can
specify:
at now + 25 days "command"
and it will run in 25 days.
However, the Windows AT Scheduler does not support this syntax.
I know it can be done in the Task Scheduler GUI, but that requires a
password to run, and because the password will change every 25 days,
it can't be run from there without also remembering to change the
password of the job which was used to schedule it.
So, does anybody know of a command line utility which will allow me to
schedule a job every 25 days?
Any help would be greatly appreciated.
Thanks.

You could schedule the job to run every day and
terminate it unless 25 days have elapsed, by embedding
it in the batch file below:

@echo off
set days=25

set /a size=2*%days%
echo.>> %temp%\test.txt
dir %temp%\test.txt | find /i "%size% test.txt" || goto :eof
del %temp%\test.txt
echo Run some command here!

The file "%temp%\test.txt (or more precisely: its size)
is used as a day counter.

You could also use the Task Scheduler and use a
special "Schedule" account that you create for the
specific purpose of using it with the Task Scheduler.
Its password would neverexpire.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top