Python script not working in batch process


 
Thread Tools Search this Thread
Operating Systems Solaris Python script not working in batch process
# 1  
Old 03-17-2013
Python script not working in batch process

Good morning, I have a python 2.3 script that runs stand alone as intended when tested, then it was put into a ksh script. when running the ksh script it runs as intended. The problem is that my script does not run when the ksh script is called by another user who runs a batch process (as of right now I do not know the specifics of this batch process) which calls the ksh script, which should call my python script. I have tried changing owner ship of my python script to the user that will be running the batch script and also gave 777 permissions to the script in hopes that would help. I am new to unix and python altogether so any input would be much appreciated. In case the internals of my script are relevant, my script does:
1. checks a directory for files
2. goes through these files and checks for a certain pattern and counts hits
3. create a file that saves the name of the file that contains matches to this pattern and how many hits were found
4. FTP the created file and all files containing hits to another machine.

my script uses an external command 'openssl' for decrypting the other machines login info.


Thanks in advance.
# 2  
Old 03-26-2013
  • Batch processes suggest that there might not be any controlling terminal, which throws some commands off, for instance, some sorts of ps calls: Man Page for ps (opensolaris Section 1) - The UNIX and Linux Forums
  • Parts of openssl can be very sensitive to file permissions and ownership, where other users have not got the same, functional .ssh* directory.
  • Another user suggests the environment is not compatible, and you may need to embed some environment setting code into your app to make it robust. Python may have additional environmental support needs.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

FTP batch file suddenly stopped working

Hello, we have a UNIX system the runs our business data. We have 4 users that use a particular batch command file to extract data for use in the Windows side of the fence: (despreg.bat) ftp ftp> open danapak (database name) connected to danapak ftp> user ccsb password ccsb ftp>... (29 Replies)
Discussion started by: Mick_Dundee
29 Replies

2. Shell Programming and Scripting

Date Format not working in python script

Good Morning, I am working on a pyhton script, where it has to fetch a file from our vendor's server over an ftp. The file is having a date format of "MMDDYYYY" (i have included in my python script), but when the script is executed it is unable to fetch the file. At the same time, if i... (1 Reply)
Discussion started by: AReddy
1 Replies

3. Shell Programming and Scripting

My Script For Process Checking is NOT Working

Hello there ULF, Good day! Just want to share my code and as well as my problem on why I'm not getting the output that I want. My original code was: #!/usr/bin/sh echo echo -n "Please input an IP-Pool: " read ip echo echo "Please wait....."... (8 Replies)
Discussion started by: rymnd_12345
8 Replies

4. Shell Programming and Scripting

Script in python to kill process by date

Hello everyone, First sorry for my english. I'm new in python and I want to create a script that allows the cleaning of a directory (/ tmp), files corresponds to a specific process according to the date. Steps: 1 - I have to find all processes of a program running, eg OpenOffice,... (0 Replies)
Discussion started by: doudoubens
0 Replies

5. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

6. Shell Programming and Scripting

Using Make to batch process files

Hello all, I have a make question, and I was hoping somebody here might be able to point me in the right direction. Here is my issue; I have a command-line tool that I use to run a conversion on an input XML file that results in an output binary file. However, this particular tool needs to... (1 Reply)
Discussion started by: jujumbura
1 Replies

7. Shell Programming and Scripting

Processing different jobs as a batch process

Hi All, I want to process consecutive jobs in a sequence but when I execute 1 job ,the control does not return to the command prompt to continue with the next job. Can anyone help me here? Thanks (3 Replies)
Discussion started by: Taranjeet Singh
3 Replies

8. Shell Programming and Scripting

User Prompt during batch script process

The script below performs an incremental database backup. When the increment backup is out of sequence, the process prompts the user: "Incremental backup out of sequece. Do you wish to continue? Y or N". This script is set to run as a scheduled process in background mode. When the script... (2 Replies)
Discussion started by: bond007jlv
2 Replies

9. Shell Programming and Scripting

trying to read batch process but need some command help

I am trying to access batch process that take place each nite. I am using Solaris 5.8 (and i am used to redhat). however I am trying to access say a certain directory. The home/oradev , is the directory...in there i am trying to access say a batch file within this, how can see if they are in... (1 Reply)
Discussion started by: etravels
1 Replies
Login or Register to Ask a Question