LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-11-2005, 12:19 PM   #1
Ateo
Member
 
Registered: Sep 2004
Location: http://longbeach.ca.u$
Distribution: Ubuntu,Gentoo, OSX
Posts: 136

Rep: Reputation: 15
[Solved] :: All cron tasks fail


Not sure what the issue is here but no matter all scripts that I execute via cron are failing. The following is the emailed message:
Quote:
/bin/bash: 1: command not found
10:15:00 Job /etc/cron.mrtg/mrtg.sh >> /dev/null 2&1 terminated (exit status: 127) (mailing output)
All tasks run as root.
/bin/bash is in root's path.
All scripts are executable.
All scripts contain #!/bin/bash as the very first line.

Any help would be appreciated.

Last edited by Ateo; 06-11-2005 at 01:34 PM.
 
Old 06-11-2005, 01:33 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
your bash syntax is a little wrong. to redirect stderr to wherever stdout has already gone, it's "2>&1". this wouldn't work from a command line either, did you not check it first?
 
Old 06-11-2005, 01:34 PM   #3
Ateo
Member
 
Registered: Sep 2004
Location: http://longbeach.ca.u$
Distribution: Ubuntu,Gentoo, OSX
Posts: 136

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by acid_kewpie
your bash syntax is a little wrong. to redirect stderr to wherever stdout has already gone, it's "2>&1". this wouldn't work from a command line either, did you not check it first?
That was exactly it. I overlooked it for some reason.. Thanks for the reply.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X apps fail when run from cron jobs ericcarlson Linux - Software 4 05-31-2009 05:26 PM
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
Cron - doesn't seem to run scheduled tasks robintw Linux - General 11 11-25-2005 01:53 AM
cron jobs work fine when invoked from webmin but fail on schedule jillu Linux - Enterprise 3 01-20-2005 01:34 PM
cron tasks MaverickApollo Linux - Software 1 02-02-2004 01:06 PM


All times are GMT -5. The time now is 02:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration