LinuxQuestions.org
Review your favorite Linux distribution.
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-25-2008, 05:04 AM   #1
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 283

Rep: Reputation: 32
crontab : launching applications


I want to launch my application using crontab at some instance of time. It fails to launch, although my application is in /bin (part of PATH environment). But it perfectly opens other applications.
I can open my application from a terminal, byt not from
What might be the problem ?

Last edited by barunparichha; 06-25-2008 at 05:05 AM.
 
Old 06-25-2008, 05:16 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
What is the application, or type of application ? A screen-oriented one or one with a GUI?

Cron has a more restrictive environment. You have to be more specific in your crontabs with various parameters, such as PATH, etc.
 
Old 06-25-2008, 05:32 AM   #3
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 283

Original Poster
Rep: Reputation: 32
it has got some GUI too.
 
Old 06-25-2008, 05:43 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Then you need to enable the X server to allow that X client to connect, and you needs to set the DISPLAY environment variable or --display option. See this lengthy thread:

http://www.linuxquestions.org/questi...ght=xhost+cron
 
Old 06-25-2008, 08:00 AM   #5
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 283

Original Poster
Rep: Reputation: 32
cron is able to open applications like xpdf with gui.
But it fails to launch my application.

Although my /var/log/messages shows
"USER root pid 31551 cmd ConMan".
 
Old 06-25-2008, 11:54 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
You are going to have to enable some logging from your application, or try creating a wrapper script that you call to capture the output or exit status of your ConMan program. I now what a "conman" is, but not your ConMan.
 
Old 06-26-2008, 12:41 AM   #7
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 283

Original Poster
Rep: Reputation: 32
i am able to launch from script.
but it is not the best way to do so, bcse it requires me to write a script for each application to launch.


So I am searching for a cleaner approach.
 
Old 06-26-2008, 12:59 AM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
No you don't. You only need to create one DEBUGGING wrapper script to see what is going wrong. Once you have some error output, and have figured out the problem, you can go back to normal.

The point is, as of now, you've given *no data* - saying "it doesn't work" helps nobody.

You have to collect some meaning error diagnostics (logs, error codes, debug output, anything!).
 
  


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
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 04:03 PM
Why cant I install applications? on Add/Remove Applications totaldisaster Ubuntu 2 04-13-2008 01:02 AM
Who is Knowing about daemon applications and how to develop these applications? ms_890 Linux - Software 0 04-14-2004 02:04 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
KDE probleme with launching opengl applications/games in Mandrake 9.1 Tairlac Linux - Software 0 10-25-2003 06:57 AM


All times are GMT -5. The time now is 11:12 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