phpScheduleIt
May 20, 2013, 11:35:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Reservation Reminders: Not really a bug....  (Read 4165 times)
franky4fingers
Jr. Member
**

Karma: 1
Posts: 53


« on: August 19, 2006, 01:29:18 PM »

Hi Nick,
on the readme.html file you wrote:

Quote

Reservation Reminders
Linux Steps
1. Open your crontab editor: crontab –e
2. Add a line to the crontab entry of the user running the web server process to run the email reminder script. Replace the directory structure below with your phpScheduleIt install path:
Code:
1 * * * * cd /web/directory/phpscheduleit/cmd; ./send_reminders.php


It means that the script runs every hour (08:01 - 09:01 - 10:01 - 11:01 etc.), don't you think is a range too big to handle reservation reminders of a few minutes?

Or you would say:
Code:
*/1 * * * * cd /web/directory/phpscheduleit/cmd; ./send_reminders.php


who starts the job every minutes?

Let me know, thanks!!!

Also if someone has php installed as apache module it doesn' work.
It's necessary to install the php-cli  (command-line interpreter).

For Debian distribution:
Code:
apt-get install php4-cli

At the end change the line above:

Code:
*/1 * * * * cd /web/directory/phpscheduleit/cmd; php4 ./send_reminders.php


Thanks,

franky4fingers
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #1 on: August 22, 2006, 10:36:21 AM »

Please let me know if those instructions are wrong.  I have no experience with cron jobs, so that syntax is just what I was told.  If it is incorrect, let me know so I can fix it in the readme.  Thanks.
Logged
franky4fingers
Jr. Member
**

Karma: 1
Posts: 53


« Reply #2 on: August 22, 2006, 04:48:27 PM »

Quote from: "Nick"
Please let me know if those instructions are wrong.  I have no experience with cron jobs, so that syntax is just what I was told.  If it is incorrect, let me know so I can fix it in the readme.  Thanks.



Nothing's wrong, everything dipends on how many minutes before the reservation's start, we want to receive the mail's reminder .
If we configure te config.php with:
Code:
$conf['app']['allowed_reminder_times'] = array(5, 10, 15, 20, 30);

it means we could want to receive a mail 5 min before the reservation start.
So the job cannot run every hour....it must run with a higher frequency, 2 min. 1 min:
Code:
*/1 * * * * cd /web/directory/phpscheduleit/cmd; ./send_reminders.php

The job is scheduled to run every minutes!!


If we need something different:
Code:
$conf['app']['allowed_reminder_times'] = array(180, 240, 300);

that is a reminder minimun 3 hours before the reservation start time it's ok to schedule the job with lower frequency:
Code:
1 * * * * cd /web/directory/phpscheduleit/cmd; ./send_reminders.php
(every 09:01 - 10:01 - 11:01 - 12:01 - etc.) or
Code:
* */1 * * * cd /web/directory/phpscheduleit/cmd; ./send_reminders.php
(better: every 09:00 - 10:00 - 11:00 - 12:00 - etc.)

At the end you could change the readme just saying: "Run your job with the frequency you need  - v. config.php - $conf['app']['allowed_reminder_times']"

What do you think?Huh

franky4fingers
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!