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

Hi All,
I have created one perl script and i want to run this script every 1 hour. so i have called this script using scheduler. The scheduler runs perfectly and i want this to be done in minimize mode and right now it's disturbing my active window. Any alternate way to do that?

Replies are listed 'Best First'.
Re: perl exe scheduler
by almut (Canon) on Jun 06, 2009 at 13:07 UTC
Re: perl exe scheduler
by Marshall (Canon) on Jun 06, 2009 at 17:17 UTC
    What you need is a different way of starting the Perl program in Windows. You can make a .bat file with a START command:

    START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/LOW | /NORMAL | /HIGH | /REALTIME] [/WAIT] [/B] [command / program] [parameters]
    The /MIN flag will start the command in minimized mode. read more here: http://www.robvanderwoude.com/ntstart.php

    There are other links..this was first one I came across. This command was introduced in NT4 and is available on 2K, XP, etc. Note that it can also specify the priority. If your script causes any performance problems, use the /LOW option to explicitly lower the process priority to lower than normal. There are many more priority levels available in Windows, but these few are usually enough! Default of normal usually is the ticket.

    Update: there maybe some way to type this command into some box in the scheduler..but if not make a .bat file and start it.

Re: perl exe scheduler
by rovf (Priest) on Jun 08, 2009 at 13:19 UTC

    As this has already been answered well, here a completely different approach, just in case you would like to see one more alternative: I'm running my scheduled perl programs using the cron utility which comes with cygwin. Though it might be questionable whether this is worth to install cygwin just for this purpose, maybe you already do have installed some cygwin packages and just need to add cron...

    -- 
    Ronald Fischer <ynnor@mm.st>