Crontab errors?

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Post Reply
Bashar
Posts: 4
Joined: Wed Jan 23, 2008 8:30 am

Crontab errors?

Post by Bashar »

i have set a crontab entry as :
0 */1 * * * php -q /home/web/public_html/timetrex/maint/cron.php > /dev/null

but i receive the following errors:

Code: Select all

DEBUG [249]:	<b>[Function]()</b>: URI: /home/web/public_html/timetrex/maint/cron.php<br>
DEBUG [251]:	<b>[Function]()</b>: Production: 1<br>
DEBUG [100]:	<b>TTDate::setTimeZone()</b>: Setting TimeZone: GMT<br>
DEBUG [476]:	<b>Install::checkPHPVersion()</b>: Comparing with Version: 5.2.5<br>
DEBUG [457]:	<b>CronJobFactory::Execute()</b>: Job is NOT currently running, running now...<br>
DEBUG [94]:	<b>Validator::inArrayKey()</b>: Key: 20<br>
DEBUG [722]:	<b>Factory::StartTransaction()</b>: StartTransaction(): Transaction Count: 0 Trans Off: 0<br>
DEBUG [768]:	<b>Factory::Save()</b>: Calling preSave()<br>
DEBUG [811]:	<b>Factory::Save()</b>:  Updating...<br>
DEBUG [636]:	<b>Factory::getUpdateQuery()</b>: Update<br>
DEBUG [354]:	<b>Validator::isDate()</b>: Raw Date: 1201102711 Converted Value: 1201102711<br>
DEBUG [667]:	<b>Factory::getUpdateQuery()</b>: Data changed, set updated date: <br>
DEBUG [849]:	<b>Factory::Save()</b>: Calling postSave()<br>
DEBUG [732]:	<b>Factory::CommitTransaction()</b>: CommitTransaction(): Transaction Count: 1 Trans Off: 1<br>
DEBUG [463]:	<b>CronJobFactory::Execute()</b>: Command: /usr/bin/php /home/web/public_html/timetrex/maint/TimeClockSync.php<br>
DEBUG [466] Array: <b>CronJobFactory::Execute()</b>: Command RetCode: 255 Output: 
<pre>
Array
(
    [0] => Status: 404 Not Found
    [1] => X-Powered-By: PHP/5.2.5
    [2] => Content-type: text/html
    [3] => 
    [4] => No input file specified.
)
</pre><br>
DEBUG [106]:	<b>Validator::isNumeric()</b>: Value:11<br>
DEBUG [94]:	<b>Validator::inArrayKey()</b>: Key: 500<br>
DEBUG [145]:	<b>Validator::isLength()</b>: Value: cron Length: 4 Min: 2 Max: 250<br>
DEBUG [145]:	<b>Validator::isLength()</b>: Value: Executing Cron Job: 11 Command: /usr/bin/php /home/web/public_html/timetrex/maint/TimeClockSync.php Return Code: 255 Length: 116 Min: 2 Max: 2000<br>
DEBUG [722]:	<b>Factory::StartTransaction()</b>: StartTransaction(): Transaction Count: 0 Trans Off: 0<br>
DEBUG [768]:	<b>Factory::Save()</b>: Calling preSave()<br>
DEBUG [354]:	<b>Validator::isDate()</b>: Raw Date: 1201102711 Converted Value: 1201102711<br>
DEBUG [798]:	<b>Factory::Save()</b>: Insert ID: 587<br>
DEBUG [704]:	<b>Factory::getInsertQuery()</b>: Insert<br>
DEBUG [39]:	<b>DBError::__construct()</b>: mysqlt error: [-32000: Cache write error] in adodb_throw(/home/web/public_html/timetrex/tmp/timetrex//bc/adodb_bcdbe307647817ad787972d2e38098d5.cache, select object_id,action_id,table_name,user_id,description,date,id from system_log where id = -1)
<br>
and i tried to run it manually got this error too:

Code: Select all

DEBUG [249]:	<b>[Function]()</b>: URI: /home/web/public_html/timetrex/maint/cron.php<br>
DEBUG [251]:	<b>[Function]()</b>: Production: 1<br>
DEBUG [100]:	<b>TTDate::setTimeZone()</b>: Setting TimeZone: GMT<br>
DEBUG [476]:	<b>Install::checkPHPVersion()</b>: Comparing with Version: 5.2.5<br>
DEBUG [444]:	<b>CronJobFactory::Execute()</b>: ERROR: Job has been running for more then 6 hours! Asssuming its an orphan, marking as ready for next run.<br>
DEBUG [94]:	<b>Validator::inArrayKey()</b>: Key: 10<br>
DEBUG [722]:	<b>Factory::StartTransaction()</b>: StartTransaction(): Transaction Count: 0 Trans Off: 0<br>
DEBUG [768]:	<b>Factory::Save()</b>: Calling preSave()<br>
DEBUG [811]:	<b>Factory::Save()</b>:  Updating...<br>
DEBUG [636]:	<b>Factory::getUpdateQuery()</b>: Update<br>
DEBUG [354]:	<b>Validator::isDate()</b>: Raw Date: 1201102879 Converted Value: 1201102879<br>
DEBUG [667]:	<b>Factory::getUpdateQuery()</b>: Data changed, set updated date: <br>
DEBUG [106]:	<b>Validator::isNumeric()</b>: Value:11<br>
DEBUG [94]:	<b>Validator::inArrayKey()</b>: Key: 20<br>
DEBUG [145]:	<b>Validator::isLength()</b>: Value: cron Length: 4 Min: 2 Max: 250<br>
DEBUG [145]:	<b>Validator::isLength()</b>: Value: Cron Job Length: 8 Min: 2 Max: 2000<br>
DEBUG [722]:	<b>Factory::StartTransaction()</b>: StartTransaction(): Transaction Count: 1 Trans Off: 1<br>
DEBUG [768]:	<b>Factory::Save()</b>: Calling preSave()<br>
DEBUG [354]:	<b>Validator::isDate()</b>: Raw Date: 1201102879 Converted Value: 1201102879<br>
DEBUG [798]:	<b>Factory::Save()</b>: Insert ID: 588<br>
DEBUG [704]:	<b>Factory::getInsertQuery()</b>: Insert<br>
DEBUG [39]:	<b>DBError::__construct()</b>: mysqlt error: [-32000: Cache write error] in adodb_throw(/home/web/public_html/timetrex/tmp/timetrex//bc/adodb_bcdbe307647817ad787972d2e38098d5.cache, select object_id,action_id,table_name,user_id,description,date,id from system_log where id = -1)
<br>

any idea what i'm missing?

just to note in in my first steps of setting the system up, so there are no entries in the in/out fields

Thank you.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

DEBUG [463]: <b>CronJobFactory::Execute()</b>: Command: /usr/bin/php /home/web/public_html/timetrex/maint/TimeClockSync.php<br>
DEBUG [466] Array: <b>CronJobFactory::Execute()</b>: Command RetCode: 255 Output:
<pre>
Array
(
[0] => Status: 404 Not Found
[1] => X-Powered-By: PHP/5.2.5
[2] => Content-type: text/html
[3] =>
[4] => No input file specified.
)
</pre><br>
This seems very strange, according to that error message it can't find or read:
/home/web/public_html/timetrex/maint/TimeClockSync.php

As for the other issue, that is directly related to permissions. You need to make sure the maintenance jobs are all run by the web server user, otherwise you will get permission issues that will cause major problems.

What version of TimeTrex are you using?
Bashar
Posts: 4
Joined: Wed Jan 23, 2008 8:30 am

Post by Bashar »

thats true the file /home/web/public_html/timetrex/maint/TimeClockSync.php does not exists

for the version i'm running 2.1.3 the community edition
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

If you are using the Standard Edition, that specific issue of the file not being there is nothing to worry about, in newer versions of TimeTrex it no longer appears, but it doesn't do any harm.
Post Reply