HOW TO configure Cron Job file and send email alerts

Talk and info about common issues and learn how to do almost anything with ApPHP Calendar

Moderator: alexandrleonenko

Site Admin
Site Admin
Posts: 6025
Joined: Jan 7th, '09, 23:18

HOW TO configure Cron Job file and send email alerts

Postby administrator » Jun 1st, '11, 09:20

The script archive already includes an example of Cron file: examples/cron.php
The code of this file is simple and intuitive.

To run sending email alerts to users, assigned to events you have to do following:
1. Configure the cron.php file.
Main features they are:

Code: Select all

    // defines email of site's administrator - must be based on site domain name.
    // defines notification pending time in hours 

    // for testing you may turn On debug mode

2. Call the cron.php file periodically.
Here the beginner's guide for Cron on a shared hosting provider:

3. Test your cron.php.
To test your cron file, you may call it directly from the browser with debug mode turned On.
For example: http://{your_site}/{your calendar directory}/cron/php

4. [Optional] Change SendNotifications() method in calendar.class.php to customize email text to suit your needs.

Return to “ApPHP Calendar {HOW TO}”