LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2008, 05:01 AM   #1
nirmit
Member
 
Registered: Feb 2008
Posts: 73

Rep: Reputation: 15
How to execute binary file from cron?


hi,

i have one binary file.andi want to execute it with crontab

i have placed crontab entry like this:-

00 01 * * * /home/CDR_BACKUP/DetailLocalBackUP.sh Ahmedabad 61.1.32.1 local


and the permission of DetailLocalBackUP.sh is 777
and ownership of the file is oracle:dba

but it is not executing from cron.It is running from the prompt!!!!
i have seen the log then it shoes like this

SESSION OPENED FOR NOBODY
SESSION CLOSED FOR NOBODY



So,please help me to resolve this problem...
 
Old 12-14-2008, 05:15 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You want to do a backup at 1am every day?
Check how you have set up your cron environment
http://www.adminschoice.com/docs/crontab.htm

*.sh files are not normally binary. By convention, binaries do not have an extension.
 
Old 12-14-2008, 05:20 AM   #3
nirmit
Member
 
Registered: Feb 2008
Posts: 73

Original Poster
Rep: Reputation: 15
ya... i have written a script andthen convert it into binary file

so should i to remove a extention sh from file.
so does it will run???
 
Old 12-14-2008, 06:06 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Well you can try - it should not make any difference.
Who is supposed to own the cron session for that program? Root? You? Who?
 
Old 12-15-2008, 01:20 AM   #5
nirmit
Member
 
Registered: Feb 2008
Posts: 73

Original Poster
Rep: Reputation: 15
root is the owner of that session
 
Old 12-17-2008, 06:03 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Then log would normally be

SESSION OPENED FOR ROOT

see?

Have you checked your cron environment yet?
 
  


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
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 09:09 AM
cannot execute binary file kish_or Linux - Newbie 4 05-07-2008 01:53 AM
cannot execute binary file kenpeter Linux - Newbie 2 01-16-2008 08:01 PM
Cannot execute binary file Sigh Linux - Server 4 09-22-2006 08:43 AM
cannot execute binary file.... ttaylor Linux - General 4 10-02-2001 02:37 AM


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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration