LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / No email reminder
Posted:  21 Jul 2013 17:57

I am having trouble with the emailing of reminders. I can get details of an event emailed (now) when saving, if the "Send mail now" option is ticked, but I do not get any reminders sent. Interestingly, when the direct email is received the "Sent" date column in my mailbox shows as INVALID. Is there some date setting I need to change? I am using php mail.

Thanks in advance.
Posted:  22 Jul 2013 14:25   Last Edited By: Roel B.
Hi there,

No email reminder
The fact that you don't get any reminder emails sent could be because your cron job definition is not correct.
Please try the following;
- Take care that there is a reminder to be sent (for instance for an event which is due in two days time, edit the event and set the send reminder to 2 days before the event and make sure there is at least one valid email address in the email list)
- launch the file lcalcron.php via your browser ( Please note that the file lcalcron.php doesn't serve any output to the browser (so a blank screen means OK).

Check if you have received an email reminder. If so, your cron job is most probably not running (correctly).

Your cron job should look something like:
crontab: 0 2 * * *
command: /usr/local/php5/bin/php /home/www/yourcalendarsite/calfolder/lcalcron.php >/dev/null 2>&1

"Send" date invalid
This is really strange. The "send" date is not produced by the calendar, but by the PHP mail function. So, as far as I know, there is nothing I can do. This problem was not reported before. I will search the web to see if this is a known problem.

Keep me informed.
Posted:  22 Jul 2013 19:43
Many thanks Roel.


No email reminder: Sorry - I didn't quite understand your comment about "If so, your cron job is most probably not running (correctly)". Anyway I tried your suggestion and an email was NOT generated. I subsequently discovered that do not support cron jobs. So that explains it presumably. Is there a way round this?

Sent date: I checked the date on an email opened in Outlook and it is fine. The problem occurs in's email reader so it seems this is a problem also. It's not a show stopper, it just means that if I retain a lot of messages in my Inbox it gets ordered in list seemingly at random, and takes a little hunting for.

Posted:  22 Jul 2013 21:55   Last Edited By: danpep

As no good for cron jons I set up an account with I remmed out line 57 in lcalcron.php as instructed in the notes. "chdir(dirname(__FILE__));". Hope this was the correct line!

Test event set for 25th, reminder requested for 3 days before event. Ran the lcalcron.php from setcronjob control panel 30 minutes ago approx. indicated that task was completed successfully but still no sign of reminder at my email address.
Posted:  22 Jul 2013 22:15   Last Edited By: Roel B.
Hi Dan,

No email reminder: The mechanism works as follows:
- The cron job starts the lcalcron.php script daily early in the morning
- The lcalcron.php script then searches the calendar database for events requiring a reminder to be sent and, when found, sends a reminder email

So when you start the lcalcron.php script via your browser, you are taking over the task of the cron job, and reminders should be send (if any needs to be sent).

There was a "reminder" problem in the past, but for the latest LuxCal version 3.1.2 no problem has been reported so far. What LuxCal version are you using?

Are you sure doesn't support cron jobs. I've not seen any ISP so far which do not support cron jobs. However, if they really don't support cron jobs, then there are sufficient free services available on the web (search e.g. for cron job server). The only thing you need is a service which starts the lcalcron.php script in your calendar's root folder.

To further analyze why your lcalcron.php isn't sending any reminders (when you launch the script manually via your browser) could you send me (e.g. by email via the Contact Us page) the URL of your calendar with a user account with rights to post (test) events?

UPDATE: I think my post crossed your previous post. From your previous post I get the feeling you are using a previous LuxCal version. Let me know which version please.

Posted:  23 Jul 2013 00:34
Hi Roel.

The version is 3.1.2. Unpacked from I spoke via chat to a representative who explicitly stated that they do not support cron jobs. I have sent an email with a user account and URL as requested. Thank you.
Posted:  23 Jul 2013 19:28
Hi Roel.

The timing of the cron job is frazzling my brain a bit but as per your instruction I will get the cron job server to run  lcancron.php at approx. 2 am. Seems I was pretty much there but just a little impatient for the  lcancron.php to do its' stuff.

Thanks very much for your help!
Posted:  25 Sep 2015 08:57   Last Edited By: Scunder
Hi Roel,

You wrote:
*  Your cron job should look something like:
*  crontab: 0 2 * * *
*  command: /usr/local/php5/bin/php /home/www/yourcalendarsite/calfolder/lcalcron.php >/dev/null 2>&1

But how to handle that piece of coding? Is that within a certain file, and where should it be placed to run automatically?

Posted:  25 Sep 2015 10:03
Hi Roel,

You wrote: "I've not seen any ISP so far which do not support cron jobs."

But really does not support cron jobs. And they wrote:

"Note that it's not that we do not support it, but that we do not provide it - but the customer can use Cronjob anyway , if he uses some external services for that."

/Scunder :)
Posted:  25 Sep 2015 19:14
Hi Scunder,

Normally you should go to the Control Panel on the server of your provider, go to cronjobs and then define a cronjob similar to the following two lines:
*  crontab: 0 2 * * *
*  command: /usr/local/php5/bin/php /home/www/yourcalendarsite/calfolder/lcalcron.php >/dev/null 2>&1

However, if your provider is, bad luck, because they are indeed one of the very few providers in the world which don't offer a cronjob service.

Luckily there are free external cronjob services, for instance: To use such an external cronjob service, you should do the following:
1. find a free cronjob service (e.g. by searching the web for "free cronjobs"), or take
2. create an account and take care that the file lcalcron.php in the calendar root is started every day at about 2am
3. edit the file lcalcron.php and add two slashes (//) at the start of line 48 (to allow the script to be started via an external service)
That should do.
Good luck!
Posted:  26 Sep 2015 23:38
Hi Roel,

Still haven't got the notifying function to work.

I did make a short email list and tested it by sending a notification (send now). It works.

Then I prepare a couple of events the way you describe above, launch lcalcron.php twice (once via my browser and then directly from the control panel on the server). In both cases the webbrowser returns to display the calender view, and nothing happens. No email was sent.

Any idea what could be wrong?
Posted:  27 Sep 2015 10:00
Hi Scunder,
Are you sure you've put the two slashes (//) at the start of line 48 in the lcalcron.php file?
I'm asking because when you launch the lcalcron.php the browser should not return to the calendar view! If the lcalcron.php file executes correctly, it does not produce any output to the browser, so the browser should display a blank (empty) page.

Brief explanation:
In the file lcalcron.php line 48 contains the following code:
if(!empty($_SERVER['REQUEST_METHOD'])){ header("Location: index.php"); exit(); } //via cron only, via browser not allowed

Normally this code will redirect the browser to the calendar when the lcalcron.php is launched via a browser or external service. This is to prevent that other (malicious) people start your lcalcron.php file.
In your case however, when you can't run a cronjob on your server, you will have to use the browser, or an external service, to launch lcalcron.php periodically. That's why in your case line 48 must be removed (or commented out).
Posted:  27 Sep 2015 22:08

Thanks! It works. I thought the "remming" of line 48 wasn't applicable when starting manually.
Though one thing puzzled me...
Today is sunday. I had an event_1 on monday that would notify 1 day ahead. And event_2 on tuesday that would notify 2 days ahead. Still only the first event showed up in the email. Why not the second one? Strange.

Anyway, I signed up on the other day, so I will try to start up that service in the week to come.

By  the way, I am working on a new (complete & correct) translation to swedish. I will send it as soon as I'm finished.

/Scunder :)
Posted:  28 Sep 2015 18:10
Hi Scunder,

A complete and correct set of Swedish  language files would be really great. The current Swedish language pack is far from complete, so we are looking forward to getting your update.
What LuxCal version are you using? We will soon release a new MySQL version and SQLite version of the calendar.This will be version 4.2.2L and 4.2.2M. This version 4.2.2 has only a few changes in the language files. If you agree I could send you the v4.2.2 Swedish language files and then if you could use these files for the translation, I will include them in the new release. In this case I will need your email address (not here in the forum, but via the Contact Us page).
Posted:  28 Sep 2015 20:20   Last Edited By: Scunder
Hi Roel,

Sure thing, I will send you my email address.
Did you have any thoughts about the "glitch" in the notify example I mentioned?

And a couple of new questions:
* Is the notify function sensitive of time of event, or only date?
* What reason(s) is there for executing the cron job at 2am in the morning? Will the result be different if running it at 7am?

/Scunder :)
Posted:  28 Sep 2015 23:15   Last Edited By: Roel B.
Hi Scunder,
I'm not sure about the "glitch". To determine if an email notification has to be sent, 12am is taken as a reference, so if you launched lcalcron.php after 12am, this might explain the "glitch". I would suggest to first make the cronjob via work and then test again.

Your new questions:
* The notify function is only looking at the date.
* The only reason for running the cron job at 2am is to have possible email reminders sent before the calendar users open their mailbox on a new day. So, no the result will not be different if you run the cron job at 7am. However, as mentioned above, the cron job must run before 12am. 2am just seems a good time to be independent of summer/winter time changes.
Tomorrow I will reply to your email.