Sponsored Content
Operating Systems AIX Find command fails in crontab Post 302459667 by raghu_shekar on Tuesday 5th of October 2010 07:07:47 AM
Old 10-05-2010
have you tried incorporating your functionality in a script and then scheduling the script in cron....???
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

crontab fails to run script

OS is Ubuntu 8.04.3. When I run the command: /usr/bin/syslogMailer < /etc/syslog.pipes/criticalMessagesFrom a bash shell it works and i receive an email as per the script however when run from crontab it does not work. Can anyone explain why and how to fix it? /usr/bin/syslogMailer... (4 Replies)
Discussion started by: jelloir
4 Replies

2. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

3. Programming

SFTP fails from crontab but works from terminal

Dear community, I'm driving crazy with a strange issue. I have a simple script to transfer a file to a remote system:#!/bin/bash echo "put /tmp/server.log" > /tmp/server1_transfer.sftp sftp -b /tmp/server1_transfer.sftp user@10.99.1.2:Between client and server there is a SSH KEY, so if I run... (15 Replies)
Discussion started by: Lord Spectre
15 Replies

4. Shell Programming and Scripting

SH script, variable built command fails, but works at command line

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

5. UNIX for Dummies Questions & Answers

Find command fails when a space is in the directory path variable

I have a script like this running under OS X 10.8. The problem arises when the find command encounters a space in the path name. I need the "dir" variable as I'll be extending the script to more general use. #!/bin/bash CFS=$IFS IFS=$(echo) set dir = "/Users/apta/Library/Mail\... (3 Replies)
Discussion started by: apta
3 Replies

6. Shell Programming and Scripting

Script won't fails when running from crontab

Hi, My script runs fine from the command line, but when crontab tries to launch it encounters lack of permissions: could not open /dev/kbd to get keyboard type US keyboard assumed could not get keyboard type US keyboard assumed split: Permission denied This is the head of the script: ... (2 Replies)
Discussion started by: Cvg
2 Replies

7. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

8. Shell Programming and Scripting

find command fails mid-way during execution

I wish to search for a particular string say "Yellow_Colors" in all files in all folders in the current directory. Below is the command I use: find ./ -type f | xargs grep -i "Yello_Colors"However, my command does not traverse all files and folders and errors out mid-way with the below error... (7 Replies)
Discussion started by: mohtashims
7 Replies

9. Shell Programming and Scripting

Need to know why crontab -e fails

more cron.txt 1 * * * * /u/ways.sh 2>&1 >/dev/null bash-4.1$ export EDITOR=vi bash-4.1$ crontab -e <cron.txt Vim: Warning: Input is not from a terminal Vim: Error reading input, exiting... Vim: Finished. The crontab file was not changed. bash-4.1$ echo $? 1 bash-4.1$ uname -a SunOS... (3 Replies)
Discussion started by: mohtashims
3 Replies

10. Shell Programming and Scripting

Find command works on Linux but fails on Solaris.

Hi, I am looking for a generic find command that works on both Linux and Solaris. I have the below command that works fine on Linux but fails on solaris.find /web/config -type f '(' -name '*.txt' -or -name '*.xml' -name '*.pro' ')' Fails on SunOS mysolaris 5.10 Generic_150400-61 sun4v sparc... (1 Reply)
Discussion started by: mohtashims
1 Replies
CRON(8) 						      System Manager's Manual							   CRON(8)

NAME
cron - clock daemon SYNOPSIS
/usr/sbin/cron DESCRIPTION
Cron executes commands at specified dates and times according to the instructions in the files /etc/crontab and /etc/crontab.local. None, either one, or both of these files may be present. Since cron never exits, it should only be executed once. This is best done by running cron from the initialization process through the file /etc/rc; see init(8). The crontab files consist of lines of seven fields each. The fields are separated by spaces or tabs. The first five are integer patterns to specify: o minute (0-59) o hour (0-23) o day of the month (1-31) o month of the year (1-12) o day of the week (1-7 with 1 = Monday) Each of these patterns may contain: o a number in the range above o two numbers separated by a minus meaning a range inclusive o a list of numbers separated by commas meaning any of the numbers o an asterisk meaning all legal values The sixth field is a user name: the command will be run with that user's uid and permissions. The seventh field consists of all the text on a line following the sixth field, including spaces and tabs; this text is treated as a command which is executed by the Shell at the specified times. A percent character (``%'') in this field is translated to a new-line character. Both crontab files are checked by cron every minute, on the minute. FILES
/etc/crontab /etc/crontab.local 7th Edition October 23, 1996 CRON(8)
All times are GMT -4. The time now is 05:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy