AddRecurringScheduleShfits

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
jorge
Posts: 23
Joined: Thu Feb 22, 2007 2:56 am

AddRecurringScheduleShfits

Post by jorge »

Hi guys:
I've come acros the next issue, I hope you can help me sort it out.

I have set up recurring scheduled shifts for two 3 users, one of them has autofill enabled. My cron jobs get executed properly. But I have noticed that AddRecurringScheduleShift.php only does one loop when executed trough cron jobs or command line (php AddRecurringScheduleShift.php) , therefore subsequent users never get inserted or punched into the schedule table.


However when the script (AddRecurringScheduleShift.php) is called from the browser it does loop normally trough all the users asigned to schedule.

Any help apreciated.
Our man from Havana
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

What version of TimeTrex are you using?

Enable debug mode and paste the output of the script here please.
jorge
Posts: 23
Joined: Thu Feb 22, 2007 2:56 am

Memory allocation

Post by jorge »

Thanks for the prompt answer.
It seems the problems is due to a memory allocation error. I've got some of them already because of the buffer output, this issue is beyond Timetrex I believe.

Thanks for your help
Our man from Havana
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Yes, PHP uses two different php.ini files, one for CLI (command line interface) and one for Apache. You need to make sure the memory_limit and max_execution time are set high enough with both.

We recommend setting them as high as possible, or to whatever the amount of RAM you have on the server is. Otherwise strange errors like this can creep in.

You can also disable all debugging and debug_buffer to reduce memory usage in the timetrex.ini.php.
Locked