Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Interpreting Shell Script errors when called from CRON Post 302615055 by Peasant on Thursday 29th of March 2012 06:38:15 AM
Old 03-29-2012
Confirm that your scripts work outside cron.
Setup the required enviroment (SHELL,PATH etc.) inside the script.

The error on mv could be that those files reside on NFS share on which local root will not be able to move (with default NFS export options)

Are you able to execute mv on those files outside the script as root ?

Regards
Peasant.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

gzip in shell script called by cron

I'm puzzled by this one. I hope you can explain it to me. I have a ksh shell script that gzips a file among other things. This works perfectly fine when the script is manually run through a shell. However, when the same script is run through cron, it does everything correctly, but it will... (2 Replies)
Discussion started by: hbau419
2 Replies

2. Shell Programming and Scripting

How to determine the script is called from CRON?

Hello expert, What I want is to determine whether the script is called from CRON or it is executed interactively? I tried the following but no luck: #!/bin/ksh cronID=`pgrep -x cron` GPID=`ps -ef -o ppid,pid | grep " $PPID$" | awk '{print $1}'` if ; then echo I am being run... (15 Replies)
Discussion started by: wes_brooks
15 Replies

3. Shell Programming and Scripting

How to determine if a script (perl) was called from a CRON job or commandline

Hi, Is there a way to determine if a Script is called from a CRON job or from a commandline Gerry. (2 Replies)
Discussion started by: jerryMcguire
2 Replies

4. Shell Programming and Scripting

Script not working when called by cron

Hello, I have the following script which works fine when ran from the command line: #!/apps/python/2.3.4/bin/python import os import sys import time user = os.getenv("USER") string = time.strftime("%m%d%y0000 " + user, time.gmtime()) However, when I have this run by crontab, I... (4 Replies)
Discussion started by: cooldude
4 Replies

5. Shell Programming and Scripting

How to return the value from the called shell script to the calling sh script

Hi all, I have two ksh scripts #sample1.sh #!/bin/ksh . ./sample2.sh echo $fileExist #sample2.sh #!/bin/ksh func() { i=1 return $a } func echo $? Here how should I return the value of sample2.sh back to sample1.sh? Thanks in advance. (2 Replies)
Discussion started by: gp_singh
2 Replies

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

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

8. Shell Programming and Scripting

Shell script to pass the config file lines as variable on the respective called function on a script

I want to make a config file which contain all the paths. i want to read the config file line by line and pass as an argument on my below function. Replace all the path with reading config path line by line and pass in respective functions. how can i achieve that? Kindly guide. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies

9. UNIX for Beginners Questions & Answers

How to pass values to a script called from within another script in shell?

Need ideas on how to achieve the below. We have a script say "profile.sh" which internally calls another existing script called "name.sh" which prompts for the name and age of a person upon execution. When i run profile.sh how can i populate a pre-defined value from another file and pass that... (1 Reply)
Discussion started by: sankasu
1 Replies

10. UNIX for Beginners Questions & Answers

How to pass values to a script called from within another script in shell?

Ceiling Light - The Forgotten Element One of the highest details concerning using an LED ceiling panel essentially offer a fantastic dance floor which definitely makes the customers dance right away.They are a quite low cost method of something like a lighting solution, simple collection up,... (1 Reply)
Discussion started by: harveyclayton
1 Replies
CRON-APT(8)						      System Manager's Manual						       CRON-APT(8)

NAME
cron-apt -- program to update the system using apt-get SYNOPSIS
cron-apt [configfile] DESCRIPTION
This manual page documents briefly the cron-apt command. cron-apt is a program that uses the information in /etc/cron-apt/action.d/ as arguments to apt-get line by line in file order. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. --help Show summary of options. CONFIGURATION
Configuration can be done by editing /etc/cron-apt/config and by adding rules to /etc/cron-apt/action.d/ The variables that you can set in /etc/cron-apt/config is documented in the configuration example in /usr/share/doc/cron-apt/examples/config From version 0.5.0 the optional FILTERCTRLM attribute is deprecated. SEE ALSO
apt-get (1) aptitude (1) AUTHOR
This manual page was written by Ola Lundqvist ola@inguza.com for the Debian GNU/Linux system (but may be used by others). This manual is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. CRON-APT(8)
All times are GMT -4. The time now is 09:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy