Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-03-2005, 11:03 AM   #1
Registered: Mar 2005
Distribution: SuSE 9.1, Ubuntu 5.10
Posts: 69

Rep: Reputation: 15
cron won't load my programs....

Hi all..., I'm trying to create a cronjob to call Azureus (I think that's the name) every day..., now, what I do is:

1 - Add this line in the cron file:

0 13 * * 1-4 /home/fernando/azureus/

The script "" is this:


cd /home/fernando/azureus/;

JAVA_BIN_=`which java`

$JAVA_BIN_ -cp swt.jar:Azureus2.2.0.2.jar -Djava.library.path=. org.gudy.azureus2.ui.swt.Main

err=`echo $?`

if [ $err -gt 1 ];
echo "There was an error" >> logAz.log
echo "Everything good" >> logAz.log

Now, if I run that script manually, it works great, and Azureus gets loaded..., but if cron runs the cron job, I get this error:

which: no java in (/usr/bin:/bin)
/home/fernando/azureus/ line 7: -cp: command not found

What's up with that????

Why does it work when I run it manually, and not when cron runs it????

Any ideas?

Thanks in advance!

Old 08-03-2005, 11:19 AM   #2
Kdr Kane
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
which: no java in (/usr/bin:/bin)
cron does not have the same search path that your username has.

Give the absolute path in your script or change the search path for cron.
Old 08-03-2005, 01:25 PM   #3
Registered: Mar 2005
Distribution: SuSE 9.1, Ubuntu 5.10
Posts: 69

Original Poster
Rep: Reputation: 15
Well, now it is actually calling the script, but azureus is crashing, I get this error in the log:

2277 DEBUG::Wed Aug 03 15:10:06 ART 2005:rg.gudy.azureus2.core3.util.FileUtil::renameFile::816:
2278 renameFile: target file '/home/fernando/.Azureus/logs/save/0_debug_1.log' already exists, failing
2279 AEDiagnostics::startup::134,AzureusCoreImpl::<init>::106,AzureusCoreImpl::create::67,AzureusCoreFact ory::create::46,Main::<init> ::35,Main::main::100
2280 Exception in thread "main" org.eclipse.swt.SWTError: No more handles
2281 at org.eclipse.swt.SWT.error(
2282 at org.eclipse.swt.SWT.error(
2283 at org.eclipse.swt.SWT.error(
2284 at org.eclipse.swt.widgets.Display.createDisplay(
2285 at org.eclipse.swt.widgets.Display.create(
2286 at<init>(
2287 at org.eclipse.swt.widgets.Display.<init>(
2288 at org.eclipse.swt.widgets.Display.<init>(
2289 at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(
2290 at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(
2291 at org.gudy.azureus2.ui.swt.mainwindow.Initializer.<init>(
2292 at org.gudy.azureus2.ui.swt.Main.<init>(
2293 at org.gudy.azureus2.ui.swt.Main.main(

Any idea what could it be???

Thanks for your help!!!!



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
Programs load very slowly! sdat1333 Mandriva 6 11-24-2004 02:41 PM
need help!! LM10/8.2 No programs to load?? Architect69 Linux - Newbie 0 09-10-2004 06:50 PM
how to run the mysql load statement in cron gschrade Linux - Software 5 07-27-2004 02:27 PM
Cannot load programs on PDA punekar Linux - Laptop and Netbook 0 04-30-2004 05:24 AM
running X programs with cron NGraphiX Linux - General 5 12-27-2002 01:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration