Re: Windows "Scheduled Task Wizard..."
- From: SmithSmith001 <SmithSmith001@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Sep 2007 13:48:01 -0700
Ya…. The basic concepts are the same from MS DOS… Windows 3.X …. Windows for
Workgroups… to Windows 200X….
Do you know any links at Microsoft documents related to the batch file
programming? As per the ‘CommandName/?’ approach we need to know atleast
command name to get started.
VB Script and any other Microsoft scripting languages have nice
documentation. Even the new ‘Windows Powershell’ has lots of resources.
Thank you,
Smith
"Pegasus (MVP)" wrote:
Thanks for the feedback. The script example I gave you is.
a batch file. In its simplest form a batch file consists of a
collection of commands such as copy, delete, move, ask
the user for some input etc. Since Windows 2000, batch
files have become a lot more intelligent. They can do
simple mathematical and string operations. Your batch
file contains an example. The command
echo %date:~7,2%
will take the current date (denoted by %date%) but
will not write the whole date string to the screen
(which would be Wed 09/26/2007) but only start
at position 7, taking two characters from there. Note
that counting starts at 0.
To get basic help, type help at the command prompt.
To get help for each command, type
xcopy /?
at the command prompt (for example). The advanced
commands are
set /?
and
for /?
Save them until later.
"SmithSmith001" <SmithSmith001@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4194F201-50AF-4A18-BACA-941D0D9F38ED@xxxxxxxxxxxxxxxx
Pegasus,
You are great. I have implemented the code as per your suggestion. It
works
for me.
By the way... what is this script is called? Is it simple DOS commands?
Where I can learn more about this scripting language? Any link to this
resource will be of great help.
Thank you,
Smith
"Pegasus (MVP)" wrote:
Do this:
- Click Start / Run / notepad.exe c:\Windows\MyTask.bat{Enter}
- Type these lines:
@echo off
echo The day of the month is %date:~7,2%
if %date:~7,2% LSS 25 goto :eof
c:\Tools\MonthLoad.exe
- Save and close the file.
- Test it.
- Invoke it with the Task Scheduler.
The code is dependent on the country you live in. The second
line (which is purely for debugging purposes) is supposed to
show you the day number. If it does not, vary the number "7"
until it does, both in lines 2 and in line 3.
"SmithSmith001" <SmithSmith001@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:890788AB-D43C-45D0-BEA6-9B2E200FCA27@xxxxxxxxxxxxxxxx
Thank you for the solution and suggestion.
How to write the batch commands.
Here is my pseudo code for MonthlyLoad.bat
------------------------------
get day of the month
if day of the month > 25
MonthLoad.exe
-------------------------------
Do not know how to write batch commands for the above.
Any advice is appreciated.
Should I use WSH. or will the vb script will do?
Thank you,
Smith
"SmithSmith001" wrote:
Windows 2000 Professional.
How to schedule a job which runs from 25th of the month to the end of
the
month every day once at 7.30 am?
I am not finding the way to schedule one job to meet the above
requirement.
Alternatively, I am scheduling 7 jobs to run 25th to the end of the
month
(31st).
Any suggestion?
Thank you,
Smith
- Follow-Ups:
- Re: Windows "Scheduled Task Wizard..."
- From: Pegasus \(MVP\)
- Re: Windows "Scheduled Task Wizard..."
- References:
- Re: Windows "Scheduled Task Wizard..."
- From: Pegasus \(MVP\)
- Re: Windows "Scheduled Task Wizard..."
- From: SmithSmith001
- Re: Windows "Scheduled Task Wizard..."
- From: Pegasus \(MVP\)
- Re: Windows "Scheduled Task Wizard..."
- Prev by Date: Re: moving data from local disks to san
- Next by Date: Re: Having to restart print server
- Previous by thread: Re: Windows "Scheduled Task Wizard..."
- Next by thread: Re: Windows "Scheduled Task Wizard..."
- Index(es):
Relevant Pages
|