Sponsored Content
Top Forums Shell Programming and Scripting Output differs when run manually and when cron job executes it Post 302739221 by JerryHone on Monday 3rd of December 2012 06:50:46 PM
Old 12-03-2012
Add a 'set -x' into the script to see what it's doing...
 

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. Solaris

SFTP errorcode 1 when run on cron but runs manually

I am trying to run a sript on cron to SFTP data to a company. Private and public keys are set up. When I run this manully it works fine, however it was failing when run on cron. I have narrowed down the problem - it fails at the code that says if the error code is 0 then continue . . . I... (2 Replies)
Discussion started by: Heidi.Ebbs
2 Replies

3. Shell Programming and Scripting

Does not run via cron job

I have a perl script, when I ran manually it works perfect. I check the permissions which are fine. How can I find out why it is not running? how can I setup a log to check. I am running it on solaris 9. It compares multiple files, SCP and then send out an e-mail. As I said when I ran it... (2 Replies)
Discussion started by: amir07
2 Replies

4. 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

5. Shell Programming and Scripting

how to run a script using cron job and send the output as attachment via e-mail using unix

how to run a script using cron job and send the output as attachment via e-mail using unix. please help me. how my cron job entry should be? As of now my cron job entry is to run the script at specific time, 15 03 * * * /path/sample.sh | mail -s "Logs" email_id In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies

6. AIX

Script not getting executed via cron but executes when executed manually.

Hi Script not getting executed via cron but executes successfully when executed manually. Please assist cbspsap01(appuser) /app/scripts > cat restart.sh #!/bin/ksh cd /app/bin date >>logfile.out echo "Restart has been started....." >>logfile.out date >>logfile.out initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies

7. Shell Programming and Scripting

Shell script not getting called through cron job but executes fine manually.

Hi, My shell script not getting called through cron job. The same works fine when executed manually. I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins: */5 * * * * /home/myfolder/abc.sh... (17 Replies)
Discussion started by: Dejavu20
17 Replies

8. Shell Programming and Scripting

Why my git command has no output in crontab but works well run this script manually?

cat /home/lyang001/update.sh #!/bin/sh #shopt -s expand_aliases HOME_DIR=/home/lyang001/updates UPDATE_MAIL=${HOME_DIR}/updates.mail rm $UPDATE_MAIL -rf cd $HOME_DIR/wr-kernel git log --no-merges --since="20 day ago" --name-status --pretty=format:"%an %h %s %cd" origin/WRLINUX_5_0_1_HEAD >>... (2 Replies)
Discussion started by: yanglei_fage
2 Replies

9. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

10. 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
KDE-BUILD(1)						User Contributed Perl Documentation					      KDE-BUILD(1)

NAME
kde-build - Updates and recompiles a tree of KDE CVS modules SYNOPSIS
kde-build DESCRIPTION
kde-build has been designed to keep a local copy of several KDE CVS modules up to date and recompile them. Those modules have to be saved in a common directory, e.g. something like ~/kde-src/ | +-> kdelibs/ | +-> kdebase/ | -> kdenetwork/ In this case, the KDE source directory would be ~/kde-src/. The script will take care of compiling them in the correct order, checks for dependencies and resolves them as far as possible. Please not that, prior to first invokation of the script, the configuration file 'kde-buildrc' has to be modified to reflect the local environment, such as paths etc. RETURN VALUE
The following error codes are returned by the script. 0 - No error seems to have occured. 1 - The script could not change into the directory of a module. 2 - The script could not open the file 'Makefile.in' of a module. 3 - The configuration of a module failed. 4 - The compilation of a module failed. 5 - The installation of a module failed. 6 - An invalid source directory was specified. 7 - An invalid Qt directory was specified. 8 - An invalid CVS client was specified. 9 - No cvsup server was specified. 10 - The temporary CVSUP configuration file couldn't be created. 11 - The configuration file kde-buildrc couldn't be loaded. EXAMPLES
cd ~/scripts/; vi ./kde-buildrc; ./kde-build BUGS
Lots, mostly that the script wasn't written with portability in mind and therefore won't run very nice on platforms other than Linux. TODO
Add a DIAGNOSIS section to this man page. AUTHOR
Frerich Raabe <raabe@kde.org> 3rd Berkeley Distribution perl v5.6.1 KDE-BUILD(1)
All times are GMT -4. The time now is 07:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy