SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Custom Commands not working

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Custom Commands not working
Author Message
mholman



Joined: 15 Jun 2009
Posts: 3
Country: United States

Post Custom Commands not working Reply with quote
What I mean by this is that I run certain commands in a batch file that won't work when executed by 24x7 but will work when run from the command line. The 2 commands that I know are doing this are gpg (used for encryption) and psexec (which i am using to run an iisreset on another machine. I have been running these scripts for years on another box, but after making a new server and testing some of the scripts, many of them are not working and I cannot finish transferring to the new machine without them. The old box was a 2003 and this one is a 2008.

I really have no idea what this problem could be, any help would be appreciated.
Tue Jun 16, 2009 6:08 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
If this works when you run the batch manually, then it must be an environment specific issue.

Do you run the batch from the same folder? Do you use the same user ID? Is the PATH environment variable set the same for the user account running 24x7 and for your account? Does 24x7 run as a service?
Tue Jun 16, 2009 6:26 pm View user's profile Send private message
mholman



Joined: 15 Jun 2009
Posts: 3
Country: United States

Post Reply with quote
I do run the batch from the same folder. I am using the same user ID, I'm logged in as the 24x7 user account and 24x7 does not run as a service. One thing I should note is that when I restarted the server one of the batches - the main one that I had been working on - began working, but all of the other ones continued to fail at the aforementioned commands. I didn't really change anything, was only adding pauses, etc. to isolate the offending line. I editted other files doing the same thing, because I had no idea what was happening, but none have fixed themselves since then.

edit: I have been working on more files, and in some files gpg will work, and will work every time, but in other files it will never work, and postie (a command for email) will work if i change directory to the path.

edit2: actually gpg may not work, but may work if i put in the path (havent had a chance to test yet). I believe it is a path problem.
Wed Jun 17, 2009 10:25 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
What errors do you get, when they don't work?
Wed Jun 17, 2009 1:19 pm View user's profile Send private message
mholman



Joined: 15 Jun 2009
Posts: 3
Country: United States

Post Reply with quote
For postie it tells me it isn't recognized as an internal or external command. For gpg the batch crashes. Also I've tested now, and gpg will not work even if I change directory to the path. For some files I have confirmed that GPG does work all the time, regardless of the current directory. For postei at least it seems like the environment path isn't being read correctly. I was under the impression that it was system wide, but it seems like I need to change something outside of the environment path, can you guide me with that?
Wed Jun 17, 2009 1:46 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
There are 2 types of environment variables - System and User. You can see them here Desktop -> My computer -> right-click then Properties -> Advanced tab -> Environment Variables button. The PATH and all other variables required for your programs should be in the System section. Please update them as needed. Hope this helps to resolve the issue.

Here is a link to Microsoft document describing step-by-step How To Manage Environment Variables in Windows XP. It is for XP, but the same steps work for W2000/Vista/2003/2008

http://support.microsoft.com/kb/310519
Wed Jun 17, 2009 6:02 pm View user's profile Send private message
DEEPAK JAIN



Joined: 26 Jun 2018
Posts: 5
Country: India

Post Observing similar issue Reply with quote
All the jobs are getting failed and showing below error when we put its path with environment variable as highlighted:

Job errors: Create process error. Extended error: Cannot run program "%ZN_TASKS_PRICE_UPLOAD%\ZN_Batches\credit_margin_export.bat": CreateProcess error=2, The system cannot find the file specified

But when we are using complete URL then scheduler is able start the job.
Tue Jun 26, 2018 9:19 am View user's profile Send private message Send e-mail
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6738

Post Reply with quote
Please create a simple test batch file and a test job with hardcoded path to the batch file.

In the batch file run
echo "/%ZN_TASKS_PRICE_UPLOAD%/" > c:\temp\test.log

Please create c:\temp if it doesn't exist. Please run the job and see what it prints to the log. I added extra / symbols in front and back of the value so that extra spaces, if any, can be seen in the log file.
Tue Jun 26, 2018 10:57 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.