Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
We don't bite newbies here... much
 
PerlMonks  

(RhetTbull) Re: System Error 1312 when using calling Perl via WinNT's AT command

by RhetTbull (Curate)
on May 29, 2002 at 00:01 UTC ( #169937=note: print w/ replies, xml ) Need Help??


in reply to System Error 1312 when using calling Perl via WinNT's AT command

I think the problem is probably with the permissions that the Scheduler service (which is used by the AT command) is running with. By default, the Scheduler service runs from the local System account which is a local account w/o network priveleges. Go to Control Panel->Services->Scheduler and make sure the Scheduler is set to start from an account with the right permissions to do what you want.

On Windows 2000, it's easier to use the Scheduled Task feature in the Control Panel than the AT command and Scheduler service. In the Scheduled Tasks properties dialog for your task, you can enter a username/password to run the script as.


Comment on (RhetTbull) Re: System Error 1312 when using calling Perl via WinNT's AT command
I think...
by Rex(Wrecks) (Curate) on May 29, 2002 at 05:18 UTC
    ...you can also use the /interactive switch in the at command and it should use currently logged on credentials.

    Disclaimer: I haven't tested this as I don't have a Perl enhanced Win2k machine here right now.

    Update: Well, looks as if the /interactive switch wasn't it :) I just read the reply after trying this earlier today...no go.

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
      Thanks for the idea Wrex, but that wasn't it. It was the Schedule service's requirement for local Administrator access rights. I am using the /interactive switch though, as I like to see the Perl activity happen in a CMD window. I was recently caught out by running a PERL script that opened a file but had an error and was waiting for me hit return before altering the file and closing it. I mistakenly called the script via the AT command, without the /interactive switch, and couldn't for the life of me work out why the file was always locked and the script would not run again unless I rebooted. The script was waiting, invisibly, for me to hit return. I now never call a Perl script via AT without the /interactive switch unless I am POSITIVE that it is bug-free.
Re: (RhetTbull) Re: System Error 1312 when using calling Perl via WinNT's AT command
by Anonymous Monk on May 30, 2002 at 00:49 UTC
    Thank ever so much sensei. That turned out to be the answer :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2014-04-17 10:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (444 votes), past polls