-   Linux - Software (
-   -   crontab : launching applications (

barunparichha 06-25-2008 06:04 AM

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 ?

Mr. C. 06-25-2008 06:16 AM

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.

barunparichha 06-25-2008 06:32 AM

it has got some GUI too.

Mr. C. 06-25-2008 06:43 AM

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:

barunparichha 06-25-2008 09:00 AM

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".

Mr. C. 06-25-2008 12:54 PM

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.

barunparichha 06-26-2008 01:41 AM

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.

Mr. C. 06-26-2008 01:59 AM

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!).

All times are GMT -5. The time now is 09:05 PM.