Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Vista Task Scheduler

by walto (Pilgrim)
on Apr 12, 2008 at 05:38 UTC ( #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
Node Status?
node history
Node Type: note [id://679948]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2021-01-27 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?