LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-03-2005, 12:03 PM   #1
haora
Member
 
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/loadAz.sh

The script "loadAz.sh" is this:


#!/bin/sh

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 ];
then
echo "There was an error" >> logAz.log
else
echo "Everything good" >> logAz.log
fi
exit;

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/loadAz.sh: 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!

Fernando
 
Old 08-03-2005, 12:19 PM   #2
Kdr Kane
Member
 
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
Quote:
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, 02:25 PM   #3
haora
Member
 
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(SWT.java:2717)
2282 at org.eclipse.swt.SWT.error(SWT.java:2616)
2283 at org.eclipse.swt.SWT.error(SWT.java:2587)
2284 at org.eclipse.swt.widgets.Display.createDisplay(Display.java:709)
2285 at org.eclipse.swt.widgets.Display.create(Display.java:694)
2286 at org.eclipse.swt.graphics.Device.<init>(Device.java:113)
2287 at org.eclipse.swt.widgets.Display.<init>(Display.java:402)
2288 at org.eclipse.swt.widgets.Display.<init>(Display.java:398)
2289 at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:71)
2290 at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:55)
2291 at org.gudy.azureus2.ui.swt.mainwindow.Initializer.<init>(Initializer.java:106)
2292 at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:73)
2293 at org.gudy.azureus2.ui.swt.Main.main(Main.java:100)

Any idea what could it be???

Thanks for your help!!!!

Fernando
 
  


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


All times are GMT -5. The time now is 10:48 AM.

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