Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: [OT] Environment variable missing for scheduled task in Windows Server 2008

by trwww (Priest)
on Jun 08, 2018 at 21:59 UTC ( #1216224=note: print w/replies, xml ) Need Help??


in reply to [OT] Environment variable missing for scheduled task in Windows Server 2008

Its been a while but I think what I did was made a .bat file that set the environment variable and started the perl script.
  • Comment on Re: [OT] Environment variable missing for scheduled task in Windows Server 2008

Replies are listed 'Best First'.
Re^2: [OT] Environment variable missing for scheduled task in Windows Server 2008
by Lotus1 (Vicar) on Jun 09, 2018 at 16:18 UTC

    Yes, that would work. Or I could have just passed the value as parameter to the script but then the scheduled task would need to be altered each time it is installed. Or the Perl script could have it hard coded but that makes updates a hassle. Or I could have a bat file to call the Perl script and that confuses people. I wrote the script for others to install and was trying to keep it simple for them. I set up the scheduled task and exported it. Then I documented how to create the environment variable and import the scheduled task, etc. Also, this variable will be useful to have available for future scripts. It worked fine for all the servers except one with no reboots needed. I'm expecting the problem to go away after rebooting since I found other problems on the server but I have to wait until Monday.

      Did the reboot work? I guess personally I prefer config files to using the environment for this stuff.

      EDIT: ah I see it did work. Good stuff

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2020-09-28 16:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (144 votes). Check out past polls.

    Notices?