Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

run a Perl program in Windows Task Scheduler

by Anonymous Monk
on Jul 26, 2013 at 16:02 UTC ( #1046548=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I know, I know, but this is essentially a Perl question. I have a <program>.pl that I want to run from the Windows Task Scheduler. I don't know how to say 'Perl <program>.pl. Is there a way to tell windows....when you see a *.pl, run it with perl?
  • Comment on run a Perl program in Windows Task Scheduler

Replies are listed 'Best First'.
Re: run a Perl program in Windows Task Scheduler
by Anonymous Monk on Jul 26, 2013 at 16:59 UTC

    I just made task scheduler run a batch file to start the perl scripts and called it a day.

      I found that: c:\perl64\bin\perl.exe <program>.pl works OK. Now I have another problem...looks like I can't send email from the program run by the scheduler. thanks for your suggestion
        Hi there,
        I have had the opportunity of having to do this recently. Does the script automatically send email without the windows task scheduler? If we see your code we might be able to help more. I have used MIME::Entity and MIME::Lite to send emails via perl script
        my $mail = MIME::Lite->new( From=> 'me@me.com, To=> 'someone@cool.com', Subject=> "Hello email ", Type=>'multipart/mixed' ); $mail->attach( Type => 'application/x-tar', Encoding => 'base64', Path => 'C:\path\to\file.tar', Filename => "file.tar" ); MIME::Lite->send('smtp','server.smtp.com',Debug=>0); $mail->send;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1046548]
Approved by dorko
help
Chatterbox?
[huck]: "and all is quiet..." "Others having an uproarious good time at the Monastery" ... something seems not quite right ...
[huck]: just the first time i noticed the "uproarious" message ... i must be bored

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-02-24 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (351 votes). Check out past polls.