My web server is a member of a Windows Domain

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
electrogoodie
Posts: 7
Joined: Fri Jul 13, 2007 10:17 pm
Location: General Santos City, Philippines
Contact:

My web server is a member of a Windows Domain

Post by electrogoodie »

Hi,

My web server for TimeTrex is a member of a Windows Domain. As an administrator, do I explicitly need to Login my Windows User Account to the computer everytime I'll turn it on? Or is it just OK to leave it turned on without Logging In my windows user account? Will the latter update the scheduled maintenance jobs particularly in cron.php?

Here is my system:

OS : Licensed Windows XP SP2
Web Server : Apache HTTP Server 2.2.4(stable)
SQL : MySQL 5.0.45
PHP : PHP 5.2.3
Melon shake
Hago
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

It can depend on how you setup the task, or what version of Windows you are running. You can check the last run time of each scheduled task to ensure it is being run often enough.

Some versions of windows have a "run only if logged on" check box as well.
electrogoodie
Posts: 7
Joined: Fri Jul 13, 2007 10:17 pm
Location: General Santos City, Philippines
Contact:

Post by electrogoodie »

Oh I see. Thank you. By the way, my TimeTrex version is 2.0.2

This is what appears to be on the Properties of Windows Scheduled Tasks
under TimeTrex Scheduled Jobs.

On the RUN is
"C:\Program Files\PHP\php-win.exe" C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\TimeTrex\maint\cron.php

Start in: php-win.exe

"Run only if logged on" is unchecked

I have read the ff forums:
http://forums.timetrex.com/viewtopic.ph ... t=cron+php
http://forums.timetrex.com/viewtopic.ph ... t=cron+php
http://forums.timetrex.com/viewtopic.ph ... t=cron+php
http://forums.timetrex.com/viewtopic.ph ... t=cron+php
http://forums.timetrex.com/viewtopic.ph ... t=cron+php

I followed everything on the forums but why do I still get that

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

Was there something I need to change in the RUN line of my
Scheduled Task? I felt there is something wrong with it, and if there is,
what will be your advice?
Melon shake
Hago
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Start in: php-win.exe
Start In: should be a directory, not an executable. Not having it set should work fine as well though.

There are two things to check, is the task actually being run, and if it is being run, is it actually executing completely and not just failing?

So, when viewing the scheduled tasks, at the far right it should say when the task was last run, if it could be run at all. What does it say?
"C:\Program Files\PHP\php-win.exe" C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\TimeTrex\maint\cron.php
Did you try running that command manually from the command prompt? What does it say? It appears that you may need quotes around the 2nd half of the command:
"C:\Program Files\PHP\php-win.exe" "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\TimeTrex\maint\cron.php"
electrogoodie
Posts: 7
Joined: Fri Jul 13, 2007 10:17 pm
Location: General Santos City, Philippines
Contact:

Scheduled Jobs snapshot

Post by electrogoodie »

This is the snapshot of my Scheduled Tasks by default: Image
which has a LAST RESULT of 0x1
but if I will place quotes around the 2nd half of the command, it will give a LAST RESULT of 0x0.

If i will execute this in the command prompt just like in the forum http://forums.timetrex.com/viewtopic.php?t=101, we have the same results with poopa except that I dont have any errors.
poopa wrote:this is from the official PHP website

As of PHP 5, a new php-win.exe file is distributed. This is equal to the CLI version, except that php-win doesn't output anything and thus provides no console (no "dos box" appears on the screen). This behavior is similar to php-gtk..


If I will replace php-win.exe with just php.exe preceeding those commands, the result is
"Jobs Executed: 0 of 10".
Melon shake
Hago
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Okay, so the cron.php runs without problems. Have you tried clicking the "Set Password" button and entering the password for the user you specified?
electrogoodie
Posts: 7
Joined: Fri Jul 13, 2007 10:17 pm
Location: General Santos City, Philippines
Contact:

Post by electrogoodie »

By default, it is already set because this computer I'm using for
TimeTrex is a member of a windows domain. If cron.php is ok,
why is it that the warning message keeps on appearing?
"WARNING: TimeTrex maintenance jobs have not run in the last 48hours. Please contact your TimeTrex administrator immediately."

Until recently, I just PUNCH IN this morning and another ERROR MESSAGE appeared:

"Incorrect Input!

Pay Period is Currently Locked, or Date/Time is incorrect."

I have already corrected the problem with that of the Date/Time because
I have downloaded the latest patch for correct time zone in PHP a couple of weeks ago before I started using this TimeTrex. Everything works ok until today, that error message appeared. Very strange...
Melon shake
Hago
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Cron.php runs fine if you execute it manually, however the problem still appears to be Windows Scheduler is not running it every minute like it should be.

When you create a Scheduled Task that runs without being logged in, you must specify the password, otherwise you get the 0x0 error status.

The reason for the pay period errors is because the maintenance jobs have not been running, these jobs MUST be run a regular basis otherwise TimeTrex stops working within a fews day/weeks, as you are experiencing.

Once cron.php has been running every minute for a full 24hours, TimeTrex should fix itself and be back to normal.
quepasa
Posts: 58
Joined: Thu Jun 21, 2007 11:16 am

Post by quepasa »

When you create a Scheduled Task that runs without being logged in, you must specify the password, otherwise you get the 0x0 error status.
It is true you need to specify the password even if your computer is in the domain and the user is a domain user. However, 0x0 is the windows completion code for "operation completed successfully," at least as far as windows is concerned (it found the scheduled program, and was able to execute it.)

How To troubleshoot scheduled tasks in Windows XP

What does the contents of the log/timetrex_cron_last_executed.log file say? If it isn't a recent date/time then the cron job definitely isn't running as it should.
electrogoodie
Posts: 7
Joined: Fri Jul 13, 2007 10:17 pm
Location: General Santos City, Philippines
Contact:

Here is my snapshot of your request

Post by electrogoodie »

Image

Though the cron.php is running now and the TimeTrex warning has disappeared since July 31, still that "Incorrect Input!

Pay Period is Currently Locked, or Date/Time is incorrect."

is appearing.

Maybe I need to start from the scratch. I will reinstall everything now...
Melon shake
Hago
Locked