Cron tab error

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Cron tab error

Post by rajeshv »

I got follwing Error

WARNING: TimeTrex maintenance jobs have not run in the last 48hours. Please contact
your TimeTrex administrator immediately.

platform : Linux
Xampp

Plz help me its urgent
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Your cronjob for TimeTrex maintenance tasks is not being run correctly. How did you set it up when you installed TimeTrex?

What version of TimeTrex are you using? If its v1.6.x go to Help -> About in the menu and it will tell you when the last maintenance job was run.
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Re

Post by rajeshv »

I had added following in the crontab

>crontab -e

* * * * * su root -c "php /backup/htdocs/timetrex/maint/cron.php"> /dev/null2>&1

>crontab : installing new crontab

Time timetrex version : 1.6.2

I have checked in Help ->

Maintenance Jobs Last Run : Never

How to rectify this....
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Try running this command manually at the console:

php /backup/htdocs/timetrex/maint/cron.php

Does it report any errors? Enable debugging in timetrex.ini.php and run it again just to check.

Also, you don't want to "su root" in cron before you run this command unless your web server is running as root. It needs to run as the same user as Apache is, otherwise it will break.
rajeshv
Posts: 25
Joined: Wed Apr 25, 2007 5:41 am

Re:

Post by rajeshv »

Thanks shaun Its working fine

I removed the su root command in cron tab
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

By remove, I hope you mean replaced with "su apache" or whatever other user your web server runs as.

This is required otherwise you will see all kinds of problems crop up. You need to make sure there are never any cache files owned by root in your TimeTrex cache directory.
Locked