Networker

Re: [Networker] Problems running pre/post cmds

2010-12-10 16:00:46
Subject: Re: [Networker] Problems running pre/post cmds
From: Denis <denis.mail.list AT FREE DOT FR>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 10 Dec 2010 21:47:21 +0100
Hello,

try to add a cmd.exe command before your script...

precmd: "c:\\windows\\system32\\cmd.exe C:\\PHA_Scripts\\SuspendSourceOne.CMD";
and so on for the pstcmd...

Denis

----- "Michael Leone" <Michael.Leone AT PHA.PHILA DOT GOV> a écrit :

> NW 7.5.2, Win2003 (server), Win2008 R2 (client).
> 
> I am trying to run a client backup that requires a pre-save command to
> 
> stop a database, and a post command to start the database services.
> Not 
> unusual, right?
> 
> I created a file "Special Jobs Run.res" on my client's res folder
> folder. 
> Put this in there:
> 
> type: savepnpc;
> precmd: "C:\\PHA_Scripts\\SuspendSourceOne.CMD";
> pstcmd: "C:\\PHA_Scripts\\ResumeSourceOne.CMD";
> timeout: "12:00:00";
> abort precmd with group: No;
> 
> And the file "C:\PHA_Scripts\SuspendSourceOne.CMD" says:
> 
> ECHO "Job start - %DATE% %TIME%" >>"C:\PHA_Scripts\logs\Suspend.log"
> ECHO "Stopping Archive %TIME%" >>"C:\PHA_Scripts\logs\Suspend.log"
> Cscript C:\PHA_Scripts\ES1_NativeArchiveSuspend.vbs
> ECHO "Stopping Activity %TIME%" >>"C:\PHA_Scripts\logs\Suspend.log"
> Cscript C:\PHA_Scripts\ES1_ActivitySuspend.vbs
> 
> However, when running the job, the server reports:
> 
> 1 retry attempted
> 32476:savepnpc: Unable to run preclntsave for group Special Job Runs 
> successfully, see savepnpc.log for possible causes.
> 
> That log (on the client) says:
> 12/10/2010 1:53:57 PM preclntsave: Starting up the precmds.
> 12/10/2010 1:53:57 PM preclntsave: No commands specified to be run.
> 12/10/2010 1:54:03 PM preclntsave: Starting up the precmds.
> 12/10/2010 1:54:03 PM preclntsave: No commands specified to be run.
> 
> 
> And I have no idea why it thinks there are no commands specified to
> run, 
> since I clearly have "precmd:
> "C:\\PHA_Scripts\\SuspendSourceOne.CMD";" in 
> the res file of the group on the client. And it uses 2 slashes, as the
> 
> delimiters, as the Admin Guide requires. And I have explicitly
> specified 
> execution paths, since these types of jobs don't inherit environments
> (I 
> think I remembered that right). And the "SuspendSourceOne.CMD" script
> 
> works perfectly from a normal command prompt. But it never seems to 
> execute when Networker runs the job.
> 
> What am I doing wrong here?
> 
> 
> -- 
> Michael Leone
> Network Administrator, ISM
> Philadelphia Housing Authority
> 2500 Jackson St
> Philadelphia, PA 19145
> Tel:  215-684-4180
> Cell: 215-252-0143
> <mailto:michael.leone AT pha.phila DOT gov>
> 
> To sign off this list, send email to listserv AT listserv.temple DOT edu and
> type "signoff networker" in the body of the email. Please write to
> networker-request AT listserv.temple DOT edu if you have any problems with
> this list. You can access the archives at
> http://listserv.temple.edu/archives/networker.html or
> via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER