Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Vista Task Scheduler

by walto (Pilgrim)
on Apr 12, 2008 at 05:38 UTC ( [id://679948]=note: print w/replies, xml ) Need Help??


in reply to Vista Task Scheduler

Running your script manually worked for me. The file output.txt is in the directory from where I executed c:\perl\bin\perl.exe "d:\scripts\test.pl. I am not sure where the scheduler would place your output.txt so I advise to set a directory within your code (make sure you have proper permissions for the directory:
use strict; chdir "c:/Users/Admin"; my $fname = "output.txt"; #open OUTPUT, ">$fname" or die "$fname: $!\n"; is more common but you +will miss the message when run by scheduler unless(open(OUTPUT,">$fname")) { exit } print OUTPUT "This worked\n"; close OUTPUT;
You can use File::HomeDir to find your home direcory.It is in the ppm repository.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2026-01-14 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.