I get this error when I start TimeTrex. When I check the "timetrex_cron_last_executed.log" file, it appears current and is updated every minute.
When I ran setup I was not given the option to schedule maintenance jobs, and when I saw this error I looked on the forumjs and saw that I needed to run the "C:\Program Files\TimeTrex\timetrex\interface\install\MaintenanceJobs.php". When I directed my browser to it it said I needed to enable install in my timetrex.ini.php file, so I did.
When I re-ran the "C:\Program Files\TimeTrex\timetrex\interface\install\MaintenanceJobs.php" file it gave me a command to run, so I opened a command prompt, ran the command and all appeared fine.
It has been about 48 hours since I ran the command and the error persists.
What did I do wrong?
WARNING: TimeTrex maintenance jobs have not run in the last
-
- Posts: 34
- Joined: Wed Sep 12, 2007 2:50 pm
Did you use the Windows binary installer to install TimeTrex originally? Or the TimeTrex .ZIP file?
The cron.php command needs to be run every minute from the Windows scheduler. The C:\Program Files\TimeTrex\timetrex\interface\install\MaintenanceJobs.php page should have given you instructions on how to setup the Windows scheduler to do this.
The cron.php command needs to be run every minute from the Windows scheduler. The C:\Program Files\TimeTrex\timetrex\interface\install\MaintenanceJobs.php page should have given you instructions on how to setup the Windows scheduler to do this.
-
- Posts: 34
- Joined: Wed Sep 12, 2007 2:50 pm
Yes I used the binary only.
The instructions it gave me:
Checking the cron log it seems to be running every minute.
(also be advised that regardless of how many times I have tried the windows installer, it never gives me the option to setup maintanence jobs.)
The instructions it gave me:
I did so, and I checked that there is a scheduled task in the windows task scheduler, and it is, and it set to run every minute.In Windows simply run this command as Administrator. Be sure that php-win.exe is in your path!
schtasks /create /tn "TimeTrex Scheduled Jobs" /tr "php-win.exe C:\Program Files\TimeTrex\timetrex\classes\modules\core\..\..\..\maint\cron.php" /sc minute
Checking the cron log it seems to be running every minute.
(also be advised that regardless of how many times I have tried the windows installer, it never gives me the option to setup maintanence jobs.)
The Windows binary installer attempts to configure the scheduler for you. For some reason it appears that it has failed.
Can you run the following SQL query from the SQL console:
Can you run the following SQL query from the SQL console:
Code: Select all
select * from cron;
-
- Posts: 34
- Joined: Wed Sep 12, 2007 2:50 pm
I ran the command, here is the output.
Code: Select all
timetrex=> select * from cron;
id | status_id | name | minute | hour | day_of_month |
month | day_of_week | command | last_run_date
| created_date | created_by | updated_date | updated_by | deleted_date | deleted
_by | deleted
----+-----------+------------------------------+--------+------+--------------+-
------+-------------+----------------------------------+------------------------
+--------------+------------+--------------+------------+--------------+--------
----+---------
8 | 10 | CheckForUpdate | 41 | 9 | * |
* | * | CheckForUpdate.php | 2007-09-16 02:41:00-07
| 1189578431 | | 1189980296 | | |
| 0
2 | 10 | AddUserDate | 15 | 0 | * |
* | * | AddUserDate.php | 2007-09-15 17:15:00-07
| 1189578431 | | 1189980297 | | |
| 0
6 | 10 | UserCount | 15 | 1 | * |
* | * | UserCount.php | 2007-09-15 18:15:00-07
| 1189578431 | | 1189980297 | | |
| 0
1 | 10 | AddPayPeriod | 0 | 0 | * |
* | * | AddPayPeriod.php | 2007-09-15 17:01:00-07
| 1189578431 | | 1189980297 | | |
| 0
3 | 10 | calcExceptions | 30 | 0 | * |
* | * | calcExceptions.php | 2007-09-15 17:31:00-07
| 1189578431 | | 1189980297 | | |
| 0
4 | 10 | AddRecurringPayStubAmendment | 45 | 0 | * |
* | * | AddRecurringPayStubAmendment.php | 2007-09-15 17:45:00-07
| 1189578431 | | 1189980297 | | |
| 0
5 | 10 | AddRecurringHoliday | 55 | 0 | * |
* | * | AddRecurringHoliday.php | 2007-09-15 17:55:00-07
| 1189578431 | | 1189980297 | | |
| 0
9 | 10 | AddAccrualPolicyTime | 30 | 1 | * |
* | * | AddAccrualPolicyTime.php | 2007-09-15 18:31:00-07
| 1189578454 | | 1189980297 | | |
| 0
10 | 10 | UpdateCurrencyRates | 45 | 1 | * |
* | * | UpdateCurrencyRates.php | 2007-09-15 18:45:00-07
| 1189578454 | | 1189980297 | | |
| 0
7 | 10 | AddRecurringScheduleShift | 20,50 | * | * |
* | * | AddRecurringScheduleShift.php | 2007-09-19 21:51:00-07
| 1189578431 | | 1190263801 | | |
| 0
11 | 10 | TimeClockSync | * | * | * |
* | * | TimeClockSync.php | 2007-09-19 21:43:00-07
| 1189578455 | | 1190285040 | | |
| 0
(11 rows)
timetrex=>
That shows that the maintenance tasks were running fine until September 19th. What happened after that date that caused them to stop working, any ideas?
Is that the exact line that Windows Scheduler is running? If so, try running it manually from the command prompt to make sure it works. php-win.exe may not be in your PATH, so it could be failing due to that.
Code: Select all
php-win.exe C:\Program Files\TimeTrex\timetrex\classes\modules\core\..\..\..\maint\cron.php
-
- Posts: 34
- Joined: Wed Sep 12, 2007 2:50 pm
Code: Select all
"php-win.exe C:\Program Files\TimeTrex\timetrex\classes\modules\core\..\..\..\maint\cron.php"
Code: Select all
"C:\Program Files\TimeTrex\php\php-win.exe" C:\Program Files\TimeTrex\timetrex\maint\cron.php
I had previously uninstalled, then reinstalled to 2.1.0-rc1 then upgraded to rc2. I wonder if maybe somewhere in there I goofed up.
We will see how it goes.
-
- Posts: 34
- Joined: Wed Sep 12, 2007 2:50 pm
-
- Posts: 34
- Joined: Wed Sep 12, 2007 2:50 pm
Currently TimeTrex won't work if you turn the computer off at all. It needs to run its maintenance tasks at specific times usually around midnight-1am. If the computer is off it can't run them and TimeTrex is unable to work properly without them.
TimeTrex is an enterprise application, and as such it is designed to run on a server that is left powered on 24/7.
TimeTrex is an enterprise application, and as such it is designed to run on a server that is left powered on 24/7.