Cron job failure


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cron job failure
# 1  
Old 03-13-2009
Cron job failure

The crontab entry looks like this...
29 13 * * * /usr/bin/mk-find --printf "%D\ %N\n" |

This is just a part of a long statement that has apostrophe in it. I will like to know why does it work at command prompt but fail if set as cronjob?
The error is...
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file

Regards,
Shantanu Oak
# 2  
Old 03-13-2009
would you mind showing us the complete line?
# 3  
Old 03-13-2009
29 13 * * * /usr/bin/mk-find -h 172.29.0.5 -u root -p passwd --noquote --comment backup --printf "%D\ %N\n" | while read var1 var2; do /usr/bin/mk-parallel-dump --basedir /root/shantanu/215 -h 172.29.0.5 -uroot -p passwd -d $var1 -t $var2; done

It looks for the table comment "backup" and take the backup of only those tables.
# 4  
Old 03-13-2009
'man crontab' yields:
Code:
     The sixth field of a line in a crontab file is a string that
     is  executed  by the shell at the specified times. A percent
     character in this field (unless escaped by \) is  translated
     to a NEWLINE character.

     Only the first line (up to a '%' or end of line) of the com-
     mand  field  is  executed by the shell. Other lines are made
     available to the command as standard input. Any  blank  line
     or  line  beginning  with  a  `#'  is  a comment and will be
     ignored.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cron Authentication Failure error in Linux

I was bogged with an error “Authentication Failure” for all of my cron jobs in Linux Ubunutu. root@Test:~# tail -f /var/log/syslog | grep cron Dec 11 16:38:01 Test cron: Authentication failure Dec 11 16:38:01 Test cron: Authentication failure Dec 11 16:38:09 Test cron: (CRON) INFO (pidfile... (1 Reply)
Discussion started by: SULTAN01
1 Replies

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

3. Shell Programming and Scripting

Cron Job failure - No such file or directory

Hi all, I'm having an issue with a script i wrote to pull information from the Amazon AWS API. Basically the script takes arguments from the command line and attempts to grab user information for each AWS access group. The command is issued like this: # sh awsReport.sh <outputFileName>... (3 Replies)
Discussion started by: ChocoTaco
3 Replies

4. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

5. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

6. Shell Programming and Scripting

autosys job configuration for job failure.

We need to configure autosys that when a job fails continously for 3 times, we need to call another job. Is this possible in Autosys, or can anyone advice on the alternative. (2 Replies)
Discussion started by: sangea
2 Replies

7. Shell Programming and Scripting

Trigger a job on autosys failure

Hi, we have thousands of autosys jobs scheduled. I want a common job or script to be triggered if any of the autosys job fails? Now, obviously i cannot have a new autosys job with condition as failure of each of 1000s of jobs. Is there an autosys script/job that invokes when any job fails and a... (1 Reply)
Discussion started by: ysrinu
1 Replies

8. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

9. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

10. UNIX for Advanced & Expert Users

Cron job failure - passwd aging feature

I have a script running as a cron job in machine A . This script ftps some files everyday from machine A to machine B, and mails me about the status. It works fine for some days....and suddenly stops running. By viewing the log files, I see that the script itself was not invoked by cron on those... (4 Replies)
Discussion started by: Deepa
4 Replies
Login or Register to Ask a Question