Ntpdate Exec Format Error
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation run-parts: failed to exec exec format error User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web shebang Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] using Cron.daily problem Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 7 of 7 Thread: using Cron.daily problem Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode June 5th, 2008 #1 wgregori View Profile View Forum Posts Private Message Just Give Me the Beans! Join Date Feb 2006 Beans 71 using Cron.daily problem I've placed this command in cron.daily /usr/sbin/ntpdate ntp.ubuntu.com pool.ntp.org This command works if I login and execute as root. However, I get the following error message emailed to me daily. /etc/cron.daily/ntpdate: run-parts: failed to exec /etc/cron.daily/ntpdate: Exec format error run-parts: /etc/cron.daily/ntpdate exited with return code 1 Any ideas what I'm doing wrong? Thanks, Wayne Adv Reply June 5th, 2008 #2 HermanAB View Profile View Forum Posts Private Message Visit Homepage make bzImage, not war Join Date Oct 2005 Location Al Ain Beans 8,493 Re: using Cron.daily problem The most like problem is that you neglected to specify the full path to *everything* in the cron script, so it cannot find something. The cron environment is very limited, for security reasons. Cheers, Herman http://www.aeronetworks.ca Adv Reply June 5th, 2008 #3 wgregori View Profile View Forum Posts Private Message Just Give Me the Beans! Join Date Feb 2006 Beans 71 Re: using Cron.daily problem Thanks Adv Reply July 5th, 2011 #4 banuk77 View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Jun 2008 Beans 1 DistroUbuntu 7.10 Gutsy Gibbon Re: using Cron.daily problem It may be too late to reply, but not for someone like me who spend a lot of time scraching and searching why my script only not working. The problem i had was, I fo
set, or doesn't exist yet) it will cause problems. So, even if your script is set to be executable (chmod +x), you'll receive an error like:
Exec format error
Just such a case manifests itself when using a script through cron (and run-parts). To remedy this problem put the following at the beginning of the script:
#!/bin/sh
That way, the system will know what to use when executing the script. Posted by Brian O'Neill at 7:28 AM Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest 24 comments: Jonathan said... Perfect, just the answer I was looking for. Thanks for publishing this https://ubuntuforums.org/showthread.php?t=819456 tip. November 24, 2010 at 3:02 AM prashanth said... thanks brian November 25, 2010 at 5:12 PM gene_kultpower said... Tanks for that hint, saved me some time :-) December 25, 2010 at 10:28 PM Chris said... Just spent several hours trying to solve an "Exec format error" in someone else's code. Turned out I hadn't initiated the shell. Thanks for posting this solution! :) August 23, 2011 at 9:56 AM Tim said... This http://brianoneill.blogspot.com/2009/07/exec-format-error-in-cron.html error type is not restricted to cron - I've just found it with ruby (via Puppet) September 20, 2011 at 12:38 AM Ashis said... It realy works,, it was very helpfull November 28, 2011 at 1:15 AM Z3rogate said... THX March 30, 2012 at 3:12 PM Z3rogate said... This comment has been removed by the author. March 30, 2012 at 3:12 PM blogger said... Thank you very much Brian !you got a point !contact at reneriffert dot com April 16, 2012 at 8:04 AM Ken Fritz said... Dude, from an ex-coworker - Thanks! This was a good hint on debugging an Asterisk script I was working on. Hope all's well. September 23, 2012 at 10:35 PM David Thomas said... Thanks, this helped solve an issue I was having with an anacron/cron scriptFor others looking, error message was: run-parts: failed to exec /etc/cron.daily/rsync-backup: Exec format errorrun-parts: /etc/cron.daily/rsync-backup exited with return code 1After adding the #!/bin/sh line to rsync-backup script the daily backups are up and running.Thanks for the helpful tip!DT December 12, 2012 at 12:47 AM ElMariachi said... Ty, Good Job!(For my cronjob) March 18, 2013 at 4:11 PM Iltn said... thanks for sharing :) June 20, 2013 at 10:47 AM Jhancy said... Thanks for posting the solution. saved the day :-) -Jhancy March 25, 2014
2004 20:08:53 +0100 Message-id: <1077217733.13670.63.camel@debbie.> In-reply-to: <[🔎]20040219164433.GA1495@dog> References: <[🔎]20040219164433.GA1495@dog> On Thu, 2004-02-19 at 17:44, Paul Mackinney wrote: > I get the following error for a cron job that https://lists.debian.org/debian-user/2004/02/msg03671.html runs ntpdate: > Date: Thu, 19 Feb 2004 06:26:42 -0800 > https://lists.ubuntu.com/archives/ubuntu-doc/2011-November/016252.html From: Cron Daemon > Subject: Cron
] [ thread ] [ subject ] [ author ] On 7 November 2011 09:57, Chris Pick