Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Scheduling a script to run on Windows

by Ninth Prince (Acolyte)
on Jun 04, 2008 at 04:41 UTC ( [id://690060]=perlquestion: print w/replies, xml ) Need Help??

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://690060]
Approved by pc88mxer
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (None)
    As of 2024-04-25 03:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found