Has anyone got the cron job to work on windows.

Ask your questions regarding TimeTrex installation here.
Locked
Street14
Posts: 9
Joined: Wed Nov 22, 2006 4:53 pm

Has anyone got the cron job to work on windows.

Post by Street14 »

I have tried many variations and still no success.
The done.php that i have points to
php-win.exe g:\www\Apache2\htdocs\timetrex\classes\modules\core\..\..\..\maint\cron.php

Well this does not work.
I look at ms schedule tasks info and there should be no ..\..\ in the path
nor does the maint\cron.php reside in
g:\www\Apache2\htdocs\timetrex\classes\modules\core\..\..\..\maint\cron.php
as there is no cron.php in any other folder but the maint folder.

Also does the php-win.exe have to be in the path to cron php as it is here
in the supplied line of code i gave. As if it is already in windows path.
Why would you supply a second argument in the command.
MS schedule task info never supplies information on supplying a argument to a command with in a path.
So again has anyone got cron to work on windows and if so please supply correct syntax to get it to work.
Thank you!
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Re: Has anyone got the cron job to work on windows.

Post by mikeb »

Street14 wrote:I have tried many variations and still no success.
The done.php that i have points to
php-win.exe g:\www\Apache2\htdocs\timetrex\classes\modules\core\..\..\..\maint\cron.php

Well this does not work.
I look at ms schedule tasks info and there should be no ..\..\ in the path
nor does the maint\cron.php reside in
g:\www\Apache2\htdocs\timetrex\classes\modules\core\..\..\..\maint\cron.php
as there is no cron.php in any other folder but the maint folder.

Also does the php-win.exe have to be in the path to cron php as it is here
in the supplied line of code i gave. As if it is already in windows path.
Why would you supply a second argument in the command.
MS schedule task info never supplies information on supplying a argument to a command with in a path.
So again has anyone got cron to work on windows and if so please supply correct syntax to get it to work.
Thank you!
Almost half of our customers and community members use TimeTrex in windows without problems at all. The "\..\..\.." is required unless you modify the path yourself. Try typing:

cd g:\www\Apache2\htdocs\timetrex\classes\modules\core\..\..\..\maint\

It should take you to the maint directory where cron.php is located.

As for php-win.exe, you can have it in your path or just specify the path to it, ie:

c:\php\php-win.exe g:\www\Apache2\htdocs\timetrex\classes\modules\core\..\..\..\maint\cron.php


This is exactly what I have in my scheduled jobs run field:

c:\php\php-win.exe C:\timetrex\classes\modules\core\..\..\..\maint\cron.php
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Street14
Posts: 9
Joined: Wed Nov 22, 2006 4:53 pm

Post by Street14 »

It does cd correctly.

Though i get no errors in the schedule tasks timetrex still shows the warning that it has not been run.
I have added the full path to php-win.exe still a no go.
What do you have in your
Start in field: or do you have nothing in that field.

As i do what i have is the path to php
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

Street14 wrote:It does cd correctly.

Though i get no errors in the schedule tasks timetrex still shows the warning that it has not been run.
I have added the full path to php-win.exe still a no go.
What do you have in your
Start in field: or do you have nothing in that field.

As i do what i have is the path to php
What happens when you run the full command manually? Does it output anything, any errors perhaps?
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Street14
Posts: 9
Joined: Wed Nov 22, 2006 4:53 pm

Post by Street14 »

I get zero errors outside of the warning from within timetrex.
I get nothing in the logs of the server or timetrex that tells me that there is a reason for something not happening.
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

Street14 wrote:I get zero errors outside of the warning from within timetrex.
I get nothing in the logs of the server or timetrex that tells me that there is a reason for something not happening.
Did you actually run the command manually and check for output though? If your PHP version isn't correct it may just output a line saying so and not actually log anything.

You can also login to your database and check the "cron" table, see if any of the rows in there have the "last_run_date" set.

Failing that, enable debug mode and verbosity level 11 and try running the cron.php manually again, this FAQ entry describes how to enable debug mode properly:

http://forums.timetrex.com/viewtopic.php?t=89
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Street14
Posts: 9
Joined: Wed Nov 22, 2006 4:53 pm

Post by Street14 »

In cron table last run date is empty.
I have run this through the command prompt i get no errors i have run this through scheduled tasks window via run command on right click.
In either case i get nothing.
I am using php 5.1.6 and postgres 8.1.
I am not sure why this is not working. As i can find nothing to show any errors in either access or task completion.
And im not sure why a cron job should have to be run. I know thats the developers choice. Though im still a bit confused why in a database one would have to run a cron job other then to optimize or clean up a db.
Dbs are ment to be interactive once data is entered or changed.
It could be somethign simple that is causing this problem. Though i have numerous applications running via the web and i have zero problems with anything else on any given day all works well. I see no error in any other web application or conflicts of resources causing the problem.
As i have seen other posts that suggest that the cron job may and may not have problems. I wish the develpers would choose a different choice of database updating. The fact that a cron job would be set to run at 1 minute intervals from the get go is very odd. Most cron jobs via the web service providers out there would suspend your account in anything under a 15 minute interval.
Well im at a loss, a scheduled task in windows is a very simple aspect of windows and i have never seen it not work for anything else.
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

Street14 wrote:In cron table last run date is empty.
I have run this through the command prompt i get no errors i have run this through scheduled tasks window via run command on right click.
In either case i get nothing.
I am using php 5.1.6 and postgres 8.1.
I am not sure why this is not working. As i can find nothing to show any errors in either access or task completion.
And im not sure why a cron job should have to be run. I know thats the developers choice. Though im still a bit confused why in a database one would have to run a cron job other then to optimize or clean up a db.
Dbs are ment to be interactive once data is entered or changed.
It could be somethign simple that is causing this problem. Though i have numerous applications running via the web and i have zero problems with anything else on any given day all works well. I see no error in any other web application or conflicts of resources causing the problem.
As i have seen other posts that suggest that the cron job may and may not have problems. I wish the develpers would choose a different choice of database updating. The fact that a cron job would be set to run at 1 minute intervals from the get go is very odd. Most cron jobs via the web service providers out there would suspend your account in anything under a 15 minute interval.
Well im at a loss, a scheduled task in windows is a very simple aspect of windows and i have never seen it not work for anything else.
Within TimeTrex there are scheduled tasks that need to be carried out at different intervals. Things like automatic pay stub amendments each pay period, adding new pay periods on schedule, recurring schedules, etc... The reason we run the cron job every minute is simply so we have the OPTION to create tasks that run frequently if we need to. The most frequently a job actually runs is about twice an hour.

Anyways, you didn't paste any log output after enabling debug mode and running cron.php again. This is what is going to help us figure out the problem. If you didn't get any log output, then comment out any debug lines in includes/CLI.php and try it once more.

Usually issues with cron turn out to be cron not actually running the command, or your PHP's CLI binary or .INI file is incorrect.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Street14
Posts: 9
Joined: Wed Nov 22, 2006 4:53 pm

Post by Street14 »

Debug Buffer
============================================================================
Memory Usage: N/A
----------------------------------------------------------------------------
DEBUG [135]: [Function](): URI: /timetrex/interface/index.php
DEBUG [137]: [Function](): Production: 1
DEBUG [92]: DateTime::setTimeZone(): Setting TimeZone: PST8PDT
DEBUG [423]: Authentication::Check(): Session Name: SessionID
DEBUG [429]: Authentication::Check(): Session ID: 971129f5325a14dbb030e74d48141905
DEBUG [278]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:971129f5325a14dbb030e74d48141905
DEBUG [78]: Authentication::getIdle(): Idle Seconds Allowed: 14400
DEBUG [278]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:971129f5325a14dbb030e74d48141905
DEBUG [62]: [Function](): User Authenticated: street
DEBUG [1622]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [92]: DateTime::setTimeZone(): Setting TimeZone: US/Eastern
DEBUG [108]: DateTime::setDateFormat(): Setting Default Date Format: d-M-y
DEBUG [122]: DateTime::setTimeFormat(): Setting Default Time Format: G:i
DEBUG [136]: DateTime::setTimeUnitFormat(): Setting Default Time Unit Format: 10
DEBUG [1622]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [954]: UserPreferenceFactory::isPreferencesComplete(): User Preferences IS Complete:
DEBUG [105]: [Function](): Station ID Cookie found! 63561d92f8c9774a5f5e2019a8d82a11
DEBUG [192]: [Function](): UnRead Messages: 0
DEBUG [48]: BreadCrumb::setCrumb(): Dropping Bread Crumb: Home URL: /timetrex/interface/index.php
DEBUG [49]: [Function](): Last Logged in Date: 03-Dec-06 18:21
DEBUG [57]: [Function](): Filter Date: 02-Dec-06 21:21
DEBUG [98]: URLBuilder::getURL(): URL: ./punch/UserExceptionList.php
DEBUG [98]: URLBuilder::getURL(): URL: ./request/UserRequestList.php
DEBUG [98]: URLBuilder::getURL(): URL: ./message/UserMessageList.php
===================================================
Street14
Posts: 9
Joined: Wed Nov 22, 2006 4:53 pm

Post by Street14 »

no errors in either the php.ini error log or the apache error log.
in fact no output in either except the date.
mikeb
Posts: 709
Joined: Thu Jul 27, 2006 11:58 am

Post by mikeb »

The error log snippet you posted seems to only contain you logging into TimeTrex. I don't see anything there about running cron.php, but I don't actually have a clue what you're really doing since you're not providing many details.

Since this has been going on for several days now, I recommend you purchase installation support so we can get this issue fixed. I expect it would take less than an hour to fix over the phone, or for us to login to your machine and do it for you.

Its up to you.
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
fodde
Posts: 26
Joined: Fri Jan 05, 2007 5:55 am

php-win.exe error

Post by fodde »

I also can't get my cron.php to work properly.

I've followed this discussion and tried the resolutions (c:\php\php-win.exe C:\timetrex\classes\modules\core\..\..\..\maint\cron.php) suggested.

My php-win gives me a C++ runtime library error (unable to load the dynamic library ...). This also happens when I double click on a .php ile instead of calling it through my browser.

I'm using apache2triad's php & mysql on a Win XP Pro system.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: php-win.exe error

Post by shaunw »

fodde wrote:I also can't get my cron.php to work properly.

I've followed this discussion and tried the resolutions (c:\php\php-win.exe C:\timetrex\classes\modules\core\..\..\..\maint\cron.php) suggested.

My php-win gives me a C++ runtime library error (unable to load the dynamic library ...). This also happens when I double click on a .php ile instead of calling it through my browser.

I'm using apache2triad's php & mysql on a Win XP Pro system.
Your PHP installation has major problems then. Please see http://forums.timetrex.com/viewtopic.php?t=89 to give us more information so we can help you.
Locked