LiTinOveWeedle has asked for the wisdom of the Perl Monks concerning the following question:

Hi my brothers in Perl,
I made scripts which control email account and send email notification by SMS to mobil phone. This scripts I scheduled at my NT server by OS scheduller. All works fine. But tell me brothers, what can be better then write our own scheduler in perl maybe with web interface? But unfortunatelly I don't know how It can be done. Is there any command which can be used to wait for some time...? I searched throught CPAN modules but I didn't found scheduller for NT. If you have idea how to easy wrote own scheduller please help me. Thanks.

added: I found Win32::AdminMisc but it is too complex for this simple usage. So better for me seems to be:
1.Some scheduler writen completely in perl, or
2.SIMPLE perl intarface to NT scheduler

Li Tin O've Weedle
mad Tsort's philosopher

Replies are listed 'Best First'.
Re: Scheduling at NT
by dws (Chancellor) on Apr 08, 2001 at 21:17 UTC
    To be portable, wait loops need to account for the possibility that sleep() might terminate prematurely. It all comes down to something like this:
    while ( ($t = time()) < $targettime ) { sleep($targettime - $t); }
    If you want to see a particularly elaborate idle loop, check out the source code for MisterHouse, which controls a pretty wild X10-infected house.

Re: Scheduling at NT
by idnopheq (Chaplain) on Apr 09, 2001 at 17:48 UTC
    Check out World's Smallest Perl Archive. Bryn has a cron.pl script that may fit your needs.

    I agree that Win32::AdminMisc's task scheduling functions are complex, but let us not blame brother Dave Roth for M$ inadequacies (IMHO).

    HTH
    Dex