Calem Community Forum

General => Setup => Topic started by: JohnHansknecht on March 13, 2008, 12:40:53 pm

Title: Challenges with scheduler.sh
Post by: JohnHansknecht on March 13, 2008, 12:40:53 pm
OK, when I run scheduler.sh from the command prompt I get the following:

[root@server02 bin]# ./scheduler.sh
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerAppender.php on line 73
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerPropertyConfigurator.php on line 565

However when I schedule a cron job as root pointing to the same file I get the following output.

Output from command /home/studentuofdjesuitssl/html/CalemEAM/bin/scheduler.sh  ..

/home/studentuofdjesuitssl/html/CalemEAM/bin/scheduler.sh: line 3: env.sh: No such file or directory
/home/studentuofdjesuitssl/html/CalemEAM/bin/scheduler.sh: line 4: scheduler/CalemSchedulerCmd.php: No such file or directory

This is on a RHEL5 box. I tried hard coding in the appropriate variables into scheduler.sh and then received:

[root@server02 bin]# ./scheduler.sh.edit
PHP Warning:  require_once(/home/studentuofdjesuitssl/html/server/conf/calem.php): failed to open stream: No such file or directory in /home/studentuofdjesuitssl/html/CalemEAM/bin/scheduler/CalemSchedulerCmd.php on line 44
PHP Fatal error:  require_once(): Failed opening required '/home/studentuofdjesuitssl/html/server/conf/calem.php' (include_path='.:/usr/share/pear') in /home/studentuofdjesuitssl/html/CalemEAM/bin/scheduler/CalemSchedulerCmd.php on line 44
[root@server02 bin]#

Suggestion on how to get the schedule.sh file running so that I can get scheduled work orders to generate?
Title: My env.sh file
Post by: JohnHansknecht on March 14, 2008, 07:19:05 am
I thought adding my env.sh file might help with the analysis

HOME_DIR=/opt/lampp
PHP_EXE=/usr/bin/php
CALEM_HOME=/home/studentuofdjesuitssl/html/CalemEAM
export CALEM_DIR=$CALEM_HOME/
Title: Challenges with scheduler.sh
Post by: calemadmin on March 17, 2008, 01:41:11 pm
Let's try to resolve the initial error, i.e., 'env.sh: No such file or directory'.
Add the following line in scheduler.sh right before '. env.sh':
cd /home/studentuofdjesuitssl/html/CalemEAM/bin
Title: Challenges with scheduler.sh
Post by: calemadmin on March 17, 2008, 03:31:10 pm
A mantis issue was added to record this issue:
http://www.calemeam.com/apps/mantis/view.php?id=111
Title: Challenges with scheduler.sh
Post by: JohnHansknecht on March 18, 2008, 10:22:31 am
OK, adding a 'cd' line to the bin directory worked. When I run a cron job the output is now.

PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerAppender.php on line 73
PHP Notice:  Only variable references should be returned by reference in /home/studentuofdjesuitssl/html/CalemEAM/server/include/log4php/LoggerPropertyConfigurator.php on line 565

I don't believe these are an issue.

Also, I went to the mantis link but it doesn't appear that I can update that record, correct?
Title: Challenges with scheduler.sh
Post by: calemadmin on March 18, 2008, 06:37:10 pm
'PHP Notice' is okay and can be turned off from your php.ini.
Added you to the R2.1.0 project so you can update.