Page 1 of 2

Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Fri Sep 15, 2017 7:24 am
by Two8nine
Hi, we are seeing the above error from all stations, I've been unable to find much information on how to proceed, as we have used the automated install.

Suggestions on how to diagnose the exact issue, or resolve are much appreciated.

Edition: Community
Version: 10.7.1
OS: Windows 10
PHP version: 7.0.17
Maintenance Jobs Last Ran: 2017-09-12 8:12PM
Installation: exe Installer.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Fri Sep 15, 2017 9:45 am
by shaunw
Based on the fact that your previous post mentioned that you were seeing internal server errors, the maintenance jobs not running could be related to that... You never sent us a copy of your error log from that post, but I would bet this issue is related to it.

Please re-run the TimeTrex web-based installer (there should be an icon for that in the Start Menu on TimeTrex server, do not re-run the .exe installer), and let us know if it shows any errors.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Fri Sep 15, 2017 10:19 am
by Two8nine
Ok, I will rerun. (for last issue we reran installer with no errors, and issue appeared resolved.)

Will update when run.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Fri Sep 15, 2017 11:44 am
by shaunw
Keep in mind the installer attempts to fix some issues when its run, so if you don't see any errors it doesn't necessarily mean there wasn't any, it might just mean that it was able to fix the issues. We would need to see the error log file to determine more information in that case.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Fri Sep 15, 2017 6:21 pm
by Two8nine
Ok, I'm unable to rerun the installer due to:

File checksums do not match, some TimeTrex files may be corrupted, missing, or not installed properly. See detailed error messages below.
File does not exist: C:\TimeTrex\timetrex\maint\AddScheduleShift.php

Not sure why this would happen, what's the suggested resolution? Re-install from dl, or other option?

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Sat Sep 16, 2017 8:53 am
by shaunw
Somehow that file must have been deleted, so at this stage you should download the full .exe installer and use it to repair your existing installation.

Do not uninstall your existing version of TimeTrex as you will lose all your data. Instead simply run the .exe installer and install over top of your existing installation and it will recognize you are wanting to do an upgrade/repair and keep all your data.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Mon Sep 18, 2017 6:06 am
by Two8nine
Tried, but the executable installer fails while copying TimeTrex/timetrex/maint/cron.php. Says there is an error copying the file from the archive, but no further details are given. System is now inoperable.

Full error message:

Error copying file from packed archive
C:[Location of installer] to C:/TimeTrex/timetrex/maint/cron.ph

Any thoughts?

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Mon Sep 18, 2017 6:45 am
by Two8nine
Ok, oddly enough I reran the installer a couple more times (definition of insanity right there.) It actually ran with no errors on the 4th try -- system is back up, and no errors are being reported -- but this behavior strikes me as very odd.

Any thoughts on what I can do to prevent this, or for that matter, cause this?

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Mon Sep 18, 2017 7:37 am
by shaunw
Its possible that you had a long running TimeTrex maintenance job, so it was holding open files preventing the installer from repairing them. Once the process finished you were able to complete the installer without errors, so that might be why trying it multiple times eventually worked. Rebooting then trying to the installer probably also would have worked.

Another possibility is if you have a virus scanner installed. If so, you should exclude the TimeTrex directory from being scanned in real-time at least (scanned on a schedule like once per day is fine if you really want to), as that will severely slow down performance and cause all sorts of issues like this too.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Mon Sep 18, 2017 8:40 am
by Two8nine
Appreciate the response. Had the virus scanner shut down, so as you say it could be a long running maintenance job, though the system has been offline since Friday. Still seems odd, but we're back up and running, so I'm happy with that. Will continue to monitor in case there's further issue, though the systems been pretty stable for us.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Thu May 31, 2018 1:34 pm
by brianoneal
Hello. I'm having the same issue as Two8nine with the "Critical Maintenance Jobs have not run in the last 48hours". I've followed most of the threads related to this problem. Is it safe to say re-running the installer as explained to Two8nine may help resolve the issue? By doing so, we wont lose any data?

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Thu May 31, 2018 1:53 pm
by mikeb
brianoneal wrote: Thu May 31, 2018 1:34 pm Hello. I'm having the same issue as Two8nine with the "Critical Maintenance Jobs have not run in the last 48hours". I've followed most of the threads related to this problem. Is it safe to say re-running the installer as explained to Two8nine may help resolve the issue? By doing so, we wont lose any data?
We always recommend that you have backups, but as long as you don't uninstall TimeTrex you should not lose your data by performing an update or re-running the installer.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Tue Jun 05, 2018 11:59 am
by brianoneal
As advised, I upgraded to the latest version of Community (v11.2.2). We still have the Warning: Critical Maintenance Jobs have not run in the last 48hrs.
Everything works in the app except the maintenance crons running. :-(

Any guidance would be greatly appreciated.

Edition: Community (on-site)
Version: 11.2.2
OS: Windows Server 2008 R2 Enterprise
PHP version: 7.0.17
Maintenance Jobs Last Ran: NEVER
Installation: exe Installer (update)

Also, I've noticed this error in our windows server event log appears quite often:

The description for Event ID 0 from source PostgreSQL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
...
ERROR: relation "msysconf" does not exist at character 28
STATEMENT: SELECT Config, nValue FROM MSysConf

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Tue Jun 05, 2018 3:08 pm
by mikeb
That error message doesn't seem to be related to TimeTrex, but it appears that you could have another software package that is using PostgreSQL as well, which may be conflicting.

If you check your Task Scheduler, it should tell you when the last time the TimeTrex maintenance task was run and if not, what the error is.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 6:46 am
by brianoneal
I found the issue in the windows log is us attaching to postgresql via ODBC to generate a few custom reports. Doesn't seem this would cause TimeTrex not to run the maintenance crons. We attach and run a query in Postgresql seldom for now.

There is nothing in the Task Scheduler related to TimeTrex. Could that be the issue for "Critical Maintenance Jobs" not running?

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 8:43 am
by mikeb
Yes, there must be an entry in the Task Scheduler that triggers the maintenance jobs to run on a regular basis. When running the TimeTrex installer it should automatically put it there as long as its run as an administrator user.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 10:01 am
by brianoneal
I did run as administrator. Nothing was added to the Task Scheduler...

Is there anything to show you to help resolve our issue? (ie: log files, ini files, etc)

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 10:05 am
by mikeb
In the c:\timetrex\ directory there should be a install log file that may be helpful.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 11:57 am
by brianoneal
Can the task scheduler entry be added manually?

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 11:59 am
by brianoneal
Install Log

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 1:08 pm
by mikeb
There are several errors in that log, but I don't think they are related to this.

Try enabling logging in timetrex.ini.php as per our FAQ ( viewtopic.php?f=6&t=89 ) then re-run the TimeTrex web installer (not the executable installer) then attach the log here once done.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Wed Jun 06, 2018 2:49 pm
by brianoneal
Thanks Mike. Those settings were already set in the debug sections. I'll try the installer again (not .exe) and include the php error log file.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Mon Jun 11, 2018 4:22 am
by brianoneal
Hello Mike. I tried re-installing TimeTrex a couple times (from the timetrex option on the windows menu that points to http://localhost:8085/interface/install/install.php). Each time took only a few seconds, as though it didn't really updated or install. It did say "complete" and gave the option to login. I tried downloading the zip file. It unzipped to a new sub folder under c:\TimeTrex as c:\TimeTrex\TimeTrex_Community_Edition_v11.2.2

Can you give me a little more direction on exactly how to re-install TimTrex to resolve the "Critical Maintenance Jobs have not run..." error without losing current data. Do I unzip the update over existing C:\TimeTrex or use the new location and move our data? A little confused.

Thanks!

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Mon Jun 11, 2018 8:53 am
by mikeb
We need to see your TimeTrex log file after you go through the web based installer, without that we are only guessing as to what the problem may be.

Re: Warning: Critical Maintenance Jobs have not run in the last 48hours

Posted: Fri Jun 22, 2018 7:52 am
by brianoneal
Tried another re-install last night using the .exe. It updated our version successfully. Still have the Warning: Critical Maintenance Jobs message.

Attached timetrex.log and install.log. There were no php errors.

ps: There is still no entry in our task scheduler (assumed for triggering TT cron jobs)