This will solve I hope all Questions regarding Cron Jobs on Win NT Servers
This is taken from the help menu of the Active Perl for Windows Distribution(open source)
you can get it at http://www.ActiveState.com
Love
Klaus
START QUOTE Active State Perl (Win Perl Toc)
#################################################################################
How do I schedule jobs on Win32 platforms?
The UNIX cron utility doesn't exist on Win32 platforms.
For Windows NT, a scheduling tool called AT is available. Unlike the UNIX cron utility, AT doesn't store its schedule
in a flat file, but is configured using command-line arguments. Note the AT command seems to be very picky
about syntax. Here is one example:
at 23:37 /interactive /every:M,T,W,Th,F,S,Su cmd /c "c:\perl\bin\perl.exe c:\test.pl"
If you don't like the command-line version of AT, there's a GUI version, WinAT, which is available with the
Windows NT Resource Kit. The "Schedule" service must be running when your job is supposed to happen.
Note that you may have problems when running AT or WinAT if the scheduled program or script requires any
special rights or permissions other than those held by "System" (ie, if it is working across computers or NT
domains). This is because NT does not properly allow you to run preinstalled NT services, such as the "Schedule"
service as a user with network priveleges. It may look like you can set the scheduler to login as a user with
network priveledges, but the service just does not recognize that user's right's and permissions and the System
userid has only local permissions.
An all-Perl cron-like solution exists at http://www.megadodo.demon.co.uk/perl/ which uses a familiar Unix-like
crontab file. This script can be ran as an NT Service (see How do I set up a Perl script as an NT Service?). When
you create your own NT service, NT lets you set the useid/password pair, and these services do recognize that
userid's rights and permissions. Hence, the scheduled program or script will have the necessary rights.
There are a few commercial cron-like schedulers. NTcrond, is available from ifdef software: http://www.ifdef.com/
and AutoTask2000 is available from http://www.cypressnet.com/ . These programs should recognize the rights and
priveleges of the userid you set their service to run under to enable the scheduled program or script to have the
necessary rights.
For Windows 95, there's a System Agent available with the Microsoft Plus! Pack. Also, there are several shareware
scheduling utilities, notably LaunchPad and Metz Scheduler. These can be found on a good shareware search
engine, such as http://www.shareware.com/ . There is also an optional "Task Scheduler" component with IE4.01
and Windows 98.
Because scheduled jobs on Windows NT run as a service (see What is a Windows NT service?), you need to take
special steps to make sure that files and environment variables are available to your script.
In some instances, Perl's internal sleep function might be an appropriate means of scheduling. For example:
$seconds = 180;
sub action;
while(1) {
&action;
sleep($seconds);
}
#####################################################################################
END QUOTE
------------------
###################
The S-mart Links Project
integrate full Shopping
Functionality into Links
http://smartlinks.i-go.to/
##################
This is taken from the help menu of the Active Perl for Windows Distribution(open source)
you can get it at http://www.ActiveState.com
Love
Klaus
START QUOTE Active State Perl (Win Perl Toc)
#################################################################################
How do I schedule jobs on Win32 platforms?
The UNIX cron utility doesn't exist on Win32 platforms.
For Windows NT, a scheduling tool called AT is available. Unlike the UNIX cron utility, AT doesn't store its schedule
in a flat file, but is configured using command-line arguments. Note the AT command seems to be very picky
about syntax. Here is one example:
at 23:37 /interactive /every:M,T,W,Th,F,S,Su cmd /c "c:\perl\bin\perl.exe c:\test.pl"
If you don't like the command-line version of AT, there's a GUI version, WinAT, which is available with the
Windows NT Resource Kit. The "Schedule" service must be running when your job is supposed to happen.
Note that you may have problems when running AT or WinAT if the scheduled program or script requires any
special rights or permissions other than those held by "System" (ie, if it is working across computers or NT
domains). This is because NT does not properly allow you to run preinstalled NT services, such as the "Schedule"
service as a user with network priveleges. It may look like you can set the scheduler to login as a user with
network priveledges, but the service just does not recognize that user's right's and permissions and the System
userid has only local permissions.
An all-Perl cron-like solution exists at http://www.megadodo.demon.co.uk/perl/ which uses a familiar Unix-like
crontab file. This script can be ran as an NT Service (see How do I set up a Perl script as an NT Service?). When
you create your own NT service, NT lets you set the useid/password pair, and these services do recognize that
userid's rights and permissions. Hence, the scheduled program or script will have the necessary rights.
There are a few commercial cron-like schedulers. NTcrond, is available from ifdef software: http://www.ifdef.com/
and AutoTask2000 is available from http://www.cypressnet.com/ . These programs should recognize the rights and
priveleges of the userid you set their service to run under to enable the scheduled program or script to have the
necessary rights.
For Windows 95, there's a System Agent available with the Microsoft Plus! Pack. Also, there are several shareware
scheduling utilities, notably LaunchPad and Metz Scheduler. These can be found on a good shareware search
engine, such as http://www.shareware.com/ . There is also an optional "Task Scheduler" component with IE4.01
and Windows 98.
Because scheduled jobs on Windows NT run as a service (see What is a Windows NT service?), you need to take
special steps to make sure that files and environment variables are available to your script.
In some instances, Perl's internal sleep function might be an appropriate means of scheduling. For example:
$seconds = 180;
sub action;
while(1) {
&action;
sleep($seconds);
}
#####################################################################################
END QUOTE
------------------
###################
The S-mart Links Project
integrate full Shopping
Functionality into Links
http://smartlinks.i-go.to/
##################