LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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: Long Beach, CA
Distribution: FreeBSD,Ubuntu,Gentoo,MacOS
Posts: 139

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,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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: Long Beach, CA
Distribution: FreeBSD,Ubuntu,Gentoo,MacOS
Posts: 139

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



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 6 06-16-2017 01:02 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration