Page 1 of 1

Maintenance Job does not run - HOUR Mismatch

Posted: Tue Jun 26, 2007 4:46 am
by vmp
Since I was getting the warning "WARNING: TimeTrex maintenance jobs have not run in the last 48hours. Please contact your TimeTrex administrator immediately." I ran the the cron.php manually at the command prompt but I'm getting the below mentioned output when cron.php runs.
Eventually no maintenance jobs run.
Kindly advise.

NOTE: Jobs are scheduled to run at specific times, therefore only some jobs are executed each time this file is run.
Jobs Executed: 0 of 10
<br>
<b>Debug Buffer</b><br>
============================================================================<br>
Memory Usage: 2880456<br>
----------------------------------------------------------------------------<br>
DEBUG [200]: <b>[Function]()</b>: URI: C:\xampp\htdocs\TimeTrex\maint\cron.php<br>
DEBUG [202]: <b>[Function]()</b>: Production: 1<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: AddPayPeriod<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: AddUserDate<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: calcExceptions<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: AddRecurringPayStubAmendment<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: AddRecurringHoliday<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: UserCount<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: AddRecurringScheduleShift<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [403]: <b>CronJobFactory::isScheduledToRun()</b>: Hour Matches: 6<br>
DEBUG [419]: <b>CronJobFactory::isScheduledToRun()</b>: Minute DOES NOT Match: 41<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: CheckForUpdate<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: AddAccrualPolicyTime<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [374]: <b>CronJobFactory::isScheduledToRun()</b>: Checking if Cron Job is scheduled to run: UpdateCurrencyRates<br>
DEBUG [382]: <b>CronJobFactory::isScheduledToRun()</b>: Epoch: 1182858060 - 26-Jun-07 3:41 PM MSD<br>
DEBUG [388]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Week Matches: 2<br>
DEBUG [393]: <b>CronJobFactory::isScheduledToRun()</b>: Month Matches: 6<br>
DEBUG [398]: <b>CronJobFactory::isScheduledToRun()</b>: Day Of Month Matches: 6<br>
DEBUG [423]: <b>CronJobFactory::isScheduledToRun()</b>: Hour DOES NOT Match: 15<br>
DEBUG [51]: <b>[Function]()</b>: CRON: Jobs Executed: 0 of 10<br>
============================================================================<br>

Posted: Tue Jun 26, 2007 9:55 am
by shaunw
That is actually perfectly normal, TimeTrex has its own scheduler built in which only runs jobs at given times, so cron.php is executed every minute, but only 2-3 times an hour does it actually do anything.

So the good news is that the maintenance jobs run fine when you execute them manually, the question becomes how come they aren't being run every minute automatically?

Are you running Windows or Linux?

Posted: Wed Jun 27, 2007 1:04 am
by vmp
I am running Windows.

Why do I still get the message "WARNING: TimeTrex maintenance jobs have not run in the last 48hours. Please contact your TimeTrex administrator immediately." in RED when logged into TimeTrex?

In addition when I go to Help --> About I get the under System Information, Maintenance Jobs Last Ran: Never

Posted: Wed Jun 27, 2007 8:26 am
by shaunw
The reason you are still getting the message is because cron.php hasn't been run at the exact times it needs to be to actually execute the jobs. Which is why it needs to be run every minute for 24hrs straight before that message will disappear.

So I would look at your scheduled tasks in Windows and make sure it is executing cron.php properly and every minute.

Are you running Windows XP? During installation did you run the command to add cron.php to your Scheduled Tasks?

Posted: Wed Jun 27, 2007 8:11 pm
by [Hari]
vmp wrote:I am running Windows.

Why do I still get the message "WARNING: TimeTrex maintenance jobs have not run in the last 48hours. Please contact your TimeTrex administrator immediately." in RED when logged into TimeTrex?

In addition when I go to Help --> About I get the under System Information, Maintenance Jobs Last Ran: Never

Just trying to help...

first, where your php-win.exe and your cron.php is installed???
example,
c:/program files/xampp/php/php-win.exe
c:/program files/xampp/htdocs/timetrex/maint/cron.php

Posted: Thu Jun 28, 2007 3:09 am
by vmp
I'm running Window XP.
I setup the scheduled task to run every minute and the Warning message no more appears.

Posted: Mon Aug 31, 2009 4:53 am
by mountdigit
VMP

can you please tell me what did you put in to add the cron on windows task scheduler:

What did you put in

Run:

Start in:

Run as:

Posted: Mon Aug 31, 2009 10:23 am
by shaunw
Please see this post for an example command to add the maintenance jobs to your windows task scheduler.
http://forums.timetrex.com/viewtopic.php?p=162#162

Questions about 'time trex has not run maintenance job in 48

Posted: Fri Sep 04, 2009 11:03 am
by erock
Greetings.

I have been running time trex in a test environment for the last week, I have not been successful at removing the dreaded 'maintenance has not been run in 48 hours' message.

I am hoping someone can help with these questions:

1) The install is only one week old. I found a post that suggested the task scheduler credentials should be changed to an administrator (it was set up as a SYSTEM account). This change is only 8 hours old.. what are the odds this is going to clear everything up? (I've read so many potential fixes, and nothing has worked, that I am losing faith).

2) I am running Windows Vista Business

3) The help/about menu shows that maintenance has never been run, I assume this will change once the magical cron job gets run at some point?

4) I checked the existng task scheduler job; it points to the location of php-win, and cron. The task was set up by the TimeTrex install..

5) The task scheduler reports a 'last result code' of (0x1) which suggests it did not fire properly.. is this normal for the first 24 hours? The task does run every minute:

C:\Program Files\TimeTrex\php\php-win.exe
C:\Program Files\TimeTrex\timetrex\maint\cron.php

I'd really like to get this running properly before next week.. so any help before the long weekend is appreciated!

Thanks in advance,

E

Posted: Fri Sep 04, 2009 1:10 pm
by shaunw
If you are still getting 'last result code' of (0x1) after you changed the scheduled task account to Administrator than the problem likely is still going to persist.

Have you tried running the scheduled task command manually from a command prompt to see if any error message appear?

Questions about 'time trex has not run maintenance job in 48

Posted: Fri Sep 04, 2009 9:38 pm
by erock
I think I may have resolved this issue, we'll see in 24 hours I guess.

I have little experience with php, so in order to run the cron job with output, I had to do a little research.

It appears to me, that php.win.exe is designed to run without a command window, and therefore is limited and cannot output it's results. Is this correct?

Running php.exe on cron.php did return some results. In a command window it said '1 of 11 jobs completed' and a comment about waiting and about letting it do its thing over time.

I then went and mucked with the scheduled task that was set up by time trex, and noted that I think the syntax in there is wrong. I think the program/script, and arguments both need to be wrapped in quotes in order to the task to run properly..

Once I did that, the scheduler reported that the task had completed successfully.

I discovered this by accident, by deciding to change the scheduled task from php-win.exe, to just php.exe. Only when I added the quotes, was I able to reproduce the "1 out of 11" output that I obserrved directly from the command line..

If any of this makes sense, I'd appreciate hearing any additional feedback..

Thanks in advance (fingers crossed),

E

adding quotes fixed it..

Posted: Sun Sep 06, 2009 11:53 am
by erock
adding quotes to the syntax in the scheduler fixed it