PDA

View Full Version : User Cron



Oddis
10-04-2007, 05:30 PM
Hi.
I am admin of a server, but a user asked me to set up a cron for him through his user panel.
The cron is set, but it will not run.
The cron value is as follow
55***
/home/user/domains/subdomain.domain.com/public_html/generator/runcrawl.php >/dev/null 2>&1
I can run the script directly from browser:
www.subdomain.domain.com/runcrawl.php

I am grateful for any help.

chatwizrd
10-04-2007, 06:32 PM
Add the full path to php before the script like this




/usr/local/bin/php /home/user/domains/subdomain.domain.com/public_html/generator/runcrawl.php

Oddis
10-04-2007, 11:54 PM
I will follow your advice.
Thanks a lot for the guidance. :)

tlchost
10-08-2007, 07:18 AM
Add the full path to php before the script like this



How would I call this script via CRON ?




#!/bin/sh

if [ -z $JAVA_HOME ]
then
JAVA=java
else
JAVA="$JAVA_HOME/bin/java"
fi

$JAVA -cp lib/Page-Generator.jar:lib/velocity-1.4.jar:lib/velocity-dep-1.4.jar:lib/fdsapi.jar:lib/JAMon.jar:lib/jdom.jar:lib/xercesImpl.jar:lib/commons-httpclient-2.0.2.jar:lib/commons-logging-api.jar:lib/log4j-1.2.7.jar:lib/jakarta-oro-2.0.8.jar:lib/xml-apis.jar -Xms64M -Xmx300M advantage.Generator




thanks

bclark94
10-08-2007, 07:32 AM
Since this is a script you would use the path to the script. Make sure the script has excute permissions.

Brian

tlchost
10-08-2007, 09:05 AM
Since this is a script you would use the path to the script. Make sure the script has excute permissions.

Brian
hmmmm....no go

The crontab looks like
0=4 12 * * * /home/atsocal/public_html/page-generator/run.sh

And the script is executeable

nobaloney
10-08-2007, 03:45 PM
What does that [b[=[/b] sign mean, Thom?

Jeff

tlchost
10-08-2007, 04:53 PM
What does that [b[=[/b] sign mean, Thom?

Jeff
Guess I'm blind...don't see it

nobaloney
10-11-2007, 09:01 AM
I screwed up the boldfacing; I should have written:

What does that = sign mean, Thom?