MySQL
  Home arrow MySQL arrow Page 3 - Setup Your Personal Reminder System Using ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Setup Your Personal Reminder System Using PHP
By: Mayank Gandhi
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 32
    2003-08-05

    Table of Contents:
  • Setup Your Personal Reminder System Using PHP
  • Article
  • Final Destination

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
    Iron Speed
     
    ADVERTISEMENT

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    Setup Your Personal Reminder System Using PHP - Final Destination


    (Page 3 of 3 )

    Now that we have built all 3 the scripts required for the Reminder System, I am sure that you would be thinking one question; how will these scripts actually send us reminder mails?

    Well, good question, up till here it was pretty much standard PHP coding, but how in the world will the script remind us when the event arrives? Well for that we use the services of CRON Jobs (*nix) or Scheduled Events (Windows). In case you have one of the popular servers which employ Cpanel, CpanelX, Plesk, etc then you will find user-friendly tools within their interface to setup Cron Jobs.

    If you have the access to setup CRON Jobs or Scheduler Events then you can easily setup an event that would run once in a day preferably at midnight using the following command:

    php /ABSOULTE/PATH/TO/reminder_send.php

    The above command will execute reminder_send.php using the command line.

    Note: /ABSOLUTE/PATH/TO corresponds to the absolute path to the directory on your server where you would store your reminder-system files. 

    E.g. /home/devarticles/public_html/reminders/

    In case you do not have access to any of the scheduling utilities, then in that case there is another alternative. You can embed the inclusion of reminder_send.php in any of your other working PHP scripts but with one prerequisite, it should be at least that popular that it executes at least once in day. Otherwise whenever the script will be executed it will send out all old reminder events too which might not be of use if the trigger date has already been passed.

    Either way here is how you can use this alternate option, add the following code in any of your .php files before starting its output,

    include("relative/path/to/reminder_send.php");

    Note: relative/path/to corresponds to the relative path to the directory where you would store your reminder-system files. E.g. ../reminders/

    As our script reminder_send.php doesn’t produce any output therefore it won’t change the working or the output of your parent script which you use to include it.

    Tip: For a tutorial on how to setup Cron jobs via Shell, visit: 


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    MYSQL ARTICLES

    - MySQL and BLOBs
    - Two Lessons in ASP and MySQL
    - Lord Of The Strings Part 2
    - Lord Of The Strings Part 1
    - Importing Data into MySQL with Navicat
    - Building a Sustainable Web Site
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - PhpED 3.2 – More Features Than You Can Poke ...
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - Security and Sessions in PHP
    - Setup Your Personal Reminder System Using PHP
    - Create a IP-Country Database Using PERL and ...
    - Developing a Dynamic Document Search in PHP ...


    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway