09-24-2008
Any chance that it is due to not having a full path? As I recall cron does not normally set up the entire environment including path data.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hey there, I'm a total newbie unix guy here and just picking this stuff up. Have a very small script I put together that works fine from the command line but not once I put it in a cron job. Searched and found this thread and am wondering it it has something to do with setting variables, though the... (7 Replies)
Discussion started by: JackTheTripper
7 Replies
2. Shell Programming and Scripting
Hi,
A cron job CJ invokes a shell script SC. SC internally invokes multiple perl scripts. One of the perl scripts deals with Accurev (i am using Accurev CLI).
The first accurev command encountered is
accurev merge -i <<file_name>> (file name has absolute path)
When I run the perl script or... (1 Reply)
Discussion started by: singh
1 Replies
3. Shell Programming and Scripting
/usr/bin/find $SEARCH_DIR -daystart \( \( -name 'KI*' -a -name '*.csv' \) -o -name '*_xyz_*' \) -mtime $DAYS_AGO -printf %f -printf "\n" | sort -r > $FILES
The above command gives different results when run on a cron job. When run manually the result is accurate. (2 Replies)
Discussion started by: nuthalapati
2 Replies
4. Shell Programming and Scripting
Ubuntu 9.10 is my linux distro
Based on forums they say that the problem is with environment .
here is my case:
login as user, then sudo -s
using this command: s3cmd put file s3://bucket >>worked!
now here is the simple script intended for testing:
#! /bin/bash
env >/tmp/cronjob.log... (1 Reply)
Discussion started by: qwerty20
1 Replies
5. UNIX for Advanced & Expert Users
I added a shell script to cron that executes every 5-15 minutes. It's used to monitor multiple environments, so it has to ssh to each machine to check the status of that machine. Sometimes, I may have more than one instance of this script running at the same time. So, here's my problem. I've... (2 Replies)
Discussion started by: mrwatkin
2 Replies
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes
CC=`which gcc`
CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies
8. Shell Programming and Scripting
Hi, I have a script that seems to run to completion when in the command-line, but when it is run using the cron, it seems to time out.
They both start and run fine, but on the CRON it stops prematurely.
The script hits an API every few seconds and grabs data.
Does anyone have any idea on... (4 Replies)
Discussion started by: phpchick
4 Replies
9. Shell Programming and Scripting
Oracle Linux 6.
Trying to set up a simple monitoring of memory usage. This command does exactly what I want at the command line:
echo $(date +%Y-%m-%d" "%H:%M:%S) $(grep PageTables /proc/meminfo) >> /home/oracle/meminfo.logBut when I put it in my crontab:
* * * * * echo $(date +%Y-%m-%d"... (2 Replies)
Discussion started by: edstevens
2 Replies
10. Shell Programming and Scripting
I wish to replace "\\n" with a single white space.
The below does the job on command-line:
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies
LEARN ABOUT CENTOS
systempapersizefile
SYSTEMPAPERNAME(3) Library Functions Manual SYSTEMPAPERNAME(3)
NAME
systempapername, defaultpapername, systempapersizefile, defaultpapersizefile - return names for managing system paper information
SYNOPSYS
#include <paper.h>
const char* systempapername(void)
const char* defaultpapername(void)
const char* systempapersizefile(void)
const char* defaultpapersizefile(void)
DESCRIPTION
systempapername() returns the name of the default paper to be used by a program. This name is obtained by looking in that order at the
PAPERCONF environment variable, at the contents of the file returned by systempapersizefile() or by using defaultpapername() as a last
chance.
defaultpapername() returns the name of the default paper to use if it is impossible to get its name from the environment.
systempapersizefile() returns the path of the papersize file to use. This path is obtained by looking at the PAPERCONF environment vari-
able or by calling defaultpapersizefile().
defaultpapersizefile returns the path of the default papersize file.
ENVIRONMENT
PAPERSIZE Paper size to use regardless of what the papersize file contains.
PAPERCONF Full path to a file containing the paper size to use.
FILES
/etc/papersize Contains the name of the system-wide default paper size to be used.
SEE ALSO
papersize(5)
17 September 2001 SYSTEMPAPERNAME(3)