Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Execution problem with Cron: Script works manually but not w/Cron. Why? Post 302941378 by cjcox on Wednesday 15th of April 2015 03:09:00 PM
Old 04-15-2015
It's quite possible that db2 is "interactive". You may have to redirect stdin, stdout, etc... to force things to work non-interactively. My guess is that it's the stdin that is giving you grief. Try redirecting using </dev/null.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can run script Manually, but not through Cron?

Hi all, I have a main script (called OracleCleanup) that runs some sql queries. that runs off a wrapper script which contains the sources for the login information and and JOB_HOME (the script is below). When I schedule this job in the cron the log says that it cannot open my list file, which... (4 Replies)
Discussion started by: MadHatter
4 Replies

2. UNIX for Dummies Questions & Answers

Works Manually - not in CRON

I've got a ksh script that works like a charm when I run it manually. When I set it up in a cron, I keep getting this error in my log: syntax error at line 90: `$' unexpected Here's my snippet of code starting at line 90: while ] do sleep 900 done What's the... (5 Replies)
Discussion started by: dstinsman
5 Replies

3. Shell Programming and Scripting

Script behaves different when run from cron vs. manually

Hey all, Just wanted to get some input on a script I am using to import files into a MySQL database. The process is pretty simple: my main server exports these files and FTPs them. I have a script that FTPs them to the machine running that runs this script. The FTP script runs without issue... (2 Replies)
Discussion started by: billtwild
2 Replies

4. AIX

Execution Problem with Cron

Guys, I am beginer in unix. There is a cobol file with fixed-width. I want to read the total Line, Word and character count. I have tried with wc-l unix command, but it returns '0'. Please advice me the correct command/steps to get the record count. Thanks in advance. (4 Replies)
Discussion started by: vibhar
4 Replies

5. Shell Programming and Scripting

Shell Script runs good manually but not through Cron tab

Hello Every one, I have a shell script which is running fine manually, but its giving me hard time when running tru cron job. :wall:. Am using #!/usr/bin/ksh >echo $SHELL /usr/bin/ksh Cron Job is as below, it execues but dosent do what i want it to do. 47 15 * * *... (1 Reply)
Discussion started by: naren.chowdhary
1 Replies

6. Shell Programming and Scripting

Calling bash script works when called manually but not via Cron?

Hi, I've got a Bash backup script I'm trying to run on a directory via a cron job nightly. If I ssh in and run the script manually it works flawlessly. If I set up the cron to run evertything is totally messed up I don't even know where to begin. Basically the path structure is ... (6 Replies)
Discussion started by: wyclef
6 Replies

7. Shell Programming and Scripting

Execution problem with CRON job

HI, I have written an executable file in unix and I was able to execute it successfully but when I called this file with cron job it was giving error like "permission denied" and "No such file or directory". Please help in how cron calls the file and what permission is required on the file... (2 Replies)
Discussion started by: vipin kumar rai
2 Replies

8. Shell Programming and Scripting

Script runs manually, but not from cron

Hi, I "borrowed" a script I found online, to start a SAP router application on a Solaris 11 (SPARC) server. The script runs fine when calling it manually, but when I schedule it to run from cron, it doesn't. I don't see any warning or failure messages anywhere, just nothing happens. ... (11 Replies)
Discussion started by: bredman
11 Replies

9. Shell Programming and Scripting

Shell Script has different ouput via cron vs when run Manually

Hello Lads, I deployed a script on my mac to start and stop EC2 instances on AWS console. The script when started manually on the terminal does the expected stop and start. Problem is when i try to schedule it on a cron, it fails to recognize the AWS Keys which i set up as ENV variable by... (2 Replies)
Discussion started by: Irishboy24
2 Replies

10. UNIX for Beginners Questions & Answers

Execution problem with Cron

Hi, I'm unable to understand why the grep command in cronjob works intermittently Expected output: Grep command to look for a particular string with today's date and exit from infinite while loop else it must sleep for 5 mins I'm using the following statement in my shell script, the... (9 Replies)
Discussion started by: charlie87
9 Replies
GnuPG::Handles(3pm)					User Contributed Perl Documentation				       GnuPG::Handles(3pm)

NAME
GnuPG::Handles - GnuPG handles bundle SYNOPSIS
use IO::Handle; my ( $stdin, $stdout, $stderr, $status_fh, $logger_fh, $passphrase_fh, ) = ( IO::Handle->new(), IO::Handle->new(), IO::Handle->new(), IO::Handle->new(), IO::Handle->new(), IO::Handle->new(), ); my $handles = GnuPG::Handles->new ( stdin => $stdin, stdout => $stdout, stderr => $stderr, status => $status_fh, logger => $logger_fh, passphrase => $passphrase_fh, ); DESCRIPTION
GnuPG::Handles objects are generally instantiated to be used in conjunction with methods of objects of the class GnuPG::Interface. GnuPG::Handles objects represent a collection of handles that are used to communicate with GnuPG. OBJECT METHODS
Initialization Methods new( %initialization_args ) This methods creates a new object. The optional arguments are initialization of data members. hash_init( %args ). OBJECT DATA MEMBERS
stdin This handle is connected to the standard input of a GnuPG process. stdout This handle is connected to the standard output of a GnuPG process. stderr This handle is connected to the standard error of a GnuPG process. status This handle is connected to the status output handle of a GnuPG process. logger This handle is connected to the logger output handle of a GnuPG process. passphrase This handle is connected to the passphrase input handle of a GnuPG process. command This handle is connected to the command input handle of a GnuPG process. options This is a hash of hashrefs of settings pertaining to the handles in this object. The outer-level hash is keyed by the names of the handle the setting is for, while the inner is keyed by the setting being referenced. For example, to set the setting "direct" to true for the filehandle "stdin", the following code will do: # assuming $handles is an already-created # GnuPG::Handles object, this sets all # options for the filehandle stdin in one blow, # clearing out all others $handles->options( 'stdin', { direct => 1 } ); # this is useful to just make one change # to the set of options for a handle $handles->options( 'stdin' )->{direct} = 1; # and to get the setting... $setting = $handles->options( 'stdin' )->{direct}; # and to clear the settings for stdin $handles->options( 'stdin', {} ); The currently-used settings are as follows: direct If the setting "direct" is true for a handle, the GnuPG process spawned will access the handle directly. This is useful for having the GnuPG process read or write directly to or from an already-opened file. SEE ALSO
GnuPG::Interface, perl v5.12.4 2009-04-21 GnuPG::Handles(3pm)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy