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

Hi All,

I have a script that I would like to run at a certain time each day. I've not used used Windows Scheduler before, but I tried it and I think we can say (with certainty) that I don't know how it works. All that happens is that it pulls up the script that I am trying to run in Perl Express (what I use to write the code).

Can anyone give me a rundown on what I need to do in Scheduler in order to get my script to run?

Thanks.

Replies are listed 'Best First'.
Re: Scheduling a script to run on Windows
by Gangabass (Vicar) on Jun 04, 2008 at 04:55 UTC

    Here is one possible way.

    create *.bat file with following string:

    PATH_TO_YOUR_perl\perl.exe PATH_TO_YOUR_FILE\your_file_name

    And place that *.bat into your Sheduler

    But i think you can simply tell Windows to open *.pl files with perl.exe (but not your Perl Express). After that you can place this script into your Sheduler.

      Went for the *.bat solution and it worked like a charm. Thanks.
Re: Scheduling a script to run on Windows
by Cody Pendant (Prior) on Jun 04, 2008 at 08:32 UTC
    Glad you've got your problem solved, but I just want to recommend this free software to you. It's way better than the built-in Windows scheduler.


    Nobody says perl looks like line-noise any more
    kids today don't know what line-noise IS ...
Re: Scheduling a script to run on Windows
by nbartusi (Scribe) on Jun 04, 2008 at 18:15 UTC
    Or you can execute perl directly, ie '<path>/perl.exe script.pl'. Don't forget to set the start directory and the user to run as.