Delicious      Technorati      Blinklist      Furl      Reddit

TimeTrex Time and Attendance

TimeTrex Time and Attendance


* FAQ    * Search
* Login   * Register

All times are UTC - 8 hours [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ] 
Author Message
 Post subject: Maintenance Jobs
PostPosted: Mon Nov 19, 2007 11:43 am 
Offline

Joined: Thu Oct 18, 2007 11:43 am
Posts: 22
I run the command as shown below to solve the maintenance jobs problem

but it gives me some error

su resnet -c "php /var/www/apache2-default/classes/modules/core/../../../maint/cron.php"
Password:


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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 1:34 pm 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 6347
Are you running that command from your crontab on a regular basis?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 1:45 pm 
Offline

Joined: Thu Oct 18, 2007 11:43 am
Posts: 22
What is a cron tab ??

I run it from the terminal it gave me that error


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 1:49 pm 
Offline

Joined: Thu Oct 18, 2007 11:43 am
Posts: 22
how to get to the cron tab ??

i dont know anything about the cron tab


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 4:52 pm 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 6347
Quote:
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


Thats not an error, its simply a notification that it is infact working correctly.

You can find a crontab howto on the internet if you search Google for: "crontab howto" or "crontab tutorial".

If you still have problems I would recommend looking into our installation support package, or using our binary installer which is available for Linux.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 27, 2007 10:08 am 
Offline

Joined: Thu Oct 18, 2007 11:43 am
Posts: 22
But it still gives me an error on the top that maintenance jobs havent been run for more than 48 hours

Why is it giving me that error ??


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 14, 2008 11:10 am 
Offline

Joined: Wed May 14, 2008 11:05 am
Posts: 12
Location: Michigan
I just replied to another post regarding cron jobs as well. More detailed instructions would be greatly appreciated. Thanks in advance!

-Shawn


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 14, 2008 2:04 pm 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 6347
The maintenance scripts (cron.php) need to be run every minute. This is what cron or the Windows Task Scheduler does when it is setup correctly.

During the TimeTrex installation procedure it explains how to setup cron properly. If you re-enable the installer in your timetrex.ini.php file, then point your web browser to:

/interface/install/MaintenanceJobs.php

You can see the instructions again.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 15, 2008 7:25 am 
Offline

Joined: Wed May 14, 2008 11:05 am
Posts: 12
Location: Michigan
Thanks Shaun,

I was confused during the initial install, but going back and researching Ubuntu Crontab and looking at the maintenance.php file I think it's working. I'm no longer getting the "Maintenance job hasn't run in 48 hours" message. One thing maybe you could clarify... I put the line in crontab as * * * * *. Does this mean it will run every minute? Is this the preferred time setting?

-Shawn


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 15, 2008 9:47 am 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 6347
Yes, five "*"'s means it will run every minute as it should. It doesn't actually do anything every minute, but TimeTrex needs one minute timing resolution for future purposes, so thats the reason it runs so often. 99.9% of the time it just exits without doing anything.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 29, 2008 9:28 pm 
Offline

Joined: Tue Jul 29, 2008 1:20 pm
Posts: 10
I don;t want to hijack but reading through this didn't help a lot. I'm running Ubuntu and trying to get the Maintenance jobs to run, I can't find a maintenance.php file so I can't follow what ssundquist did. When I run the cron.php from command line I get nothing returned I get what you see in the below screenshot, a blinking cursor. What am I doing wrong? I'm running the command su poopythej -c php /home/poopythej/TimeTrex/timetrex/maint/cron.php as that's where TimeTrex is installed to. Since I can't see anything occuring and I still get the Maintenance jobs haven't run in 48hrs command I'm loath to attempt to set it up in cron for fear of doing something wrong and I haven't found a good example of what it should look like in crontab once it's setup. Any information or advise would be wonderful, I need to demo this for the owner of the company and the HR staff next week and any help would be greatly appreciated.

Image[/img]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 31, 2008 12:42 pm 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 6347
It looks like the command you ran didn't finish by the time you took the screenshot. The maintenance jobs can take quite a while to run if they haven't been run in several days, you should wait at least 10-15 minutes to see if they eventually finish.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 31, 2008 9:06 pm 
Offline

Joined: Tue Jul 29, 2008 1:20 pm
Posts: 10
No never finished even the next day, however after modifying the path I got the command line to work using " su poopythej -c "php /home/poopythej/TimeTrex/timetrex/maint/cron.php""
I go some errors with things wrong like PHP_Magic_Quotes and PHP PEAR but I got those fixed now the command runs without error from the command line. I've entered the job into my crontab as well however I still recieve the big red box notifying me that maintenance jobs haven't run in 48hrs. Here is my crontab entry,

* * * * * su poopythej -c "php /home/poopythej/TimeTrex/timetrex/maint/cron.php"> /dev/null > 2 &1

How can I tell if crontab is running the cron.php job? Last time I ran cron.php manually I got this...

poopythej@poopythej-desktop:~$ su poopythej -c "php /home/poopythej/TimeTrex/timetrex/maint/cron.php"
Password:
NOTE: Jobs are scheduled to run at specific times, therefore only some jobs are executed each time this file is run.
Jobs Executed: 6 of 11


I'm assuming that given cron.php running regularly it should not be running 6 of 11 tasks but 0 tasks. How can I check if the job is running or not? I've recently migrated to linux as the owner of the company is interested in migrating to it and I have some experience with it so I've taken over the project but my experience in linux is very limited. I assume changing the null line will give me a log somewhere to read but what do I change it to and where is the log to be located?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 01, 2008 12:54 am 
Offline

Joined: Tue Jul 29, 2008 1:20 pm
Posts: 10
figured it out the crontab entry was wrong after adjusting it I'm getting mail with notifications of jobs run.

proper format of the crontab is this

* * * * * php /home/poopythej/TimeTrex/timetrex/maint/cron.php


not what I had earlier. All seems well though I still have the red box, how long till that'll go away if everything really is working correctly?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 01, 2008 9:08 am 
Offline

Joined: Tue Sep 19, 2006 2:22 pm
Posts: 6347
The red warning message should disappear instantly in the latest versions of TimeTrex. Are you sure you are running the cron.php file as the same user that your web server is running as?

If they are different users this will cause you all kinds of problems, because they both need to read/write the same files and the permissions won't allow them to do so.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 01, 2008 9:27 pm 
Offline

Joined: Tue Jul 29, 2008 1:20 pm
Posts: 10
Error is gone now, It must have just taken a couple of runs cause after the first run it was still there but getting on this morning it was gone. Now I just need to figure out why my schedules don;t seem to be actually notifying me if someone doesn't punch in or out. But that's another discussion.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Time and Attendance




Powered by phpBB® Forum Software © phpBB Group