Solved

reminder script

Posted on 2009-05-06
4
326 Views
Last Modified: 2013-12-12
Hi,
I have a website where the user registration form stores the date of birth of users. I want a script that send reminders about each users birthday one day before.
Should I need a cronjob for doing this? If so, please help me start with it.
I am open to any suggestions.

Thanks in advance

0
Comment
Question by:CWS (haripriya)
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:basic612
ID: 24314205
not tested this personally but it seems to be a pretty good match:

http://www.phpbirthday.org/

It's open source so you'd be able to review the code to see how they're achieving the results

HTH
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 24333212
Hi,
Thanks for the suggestion. I can create the php script my self, but I have never tried cron job. So, I want to know how to start with. I can create the birthday reminder script, but how to execute it automatically from the server every day?

Thanks once again.
0
 
LVL 6

Accepted Solution

by:
basic612 earned 500 total points
ID: 24333336
triggering php scripts from cron is pretty straight forward. The exact setup depends on your hosting environment. Do you have a control panel such as cPanel or plesk? If so there will be a cron config option in there.

you can trigger the script to run from command line, eg:

0 10 * * * /usr/local/bin/php -q /home/yoursite/public_html/birthday.php  > /dev/null 2>&1

which will run the php script every day at 10am

alternatively you could use wget

0 10 * * * /usr/bin/wget -q http://yoursite.com/birthday.php   > /dev/null 2>&1

Hope that helps.
0
 
LVL 16

Author Closing Comment

by:CWS (haripriya)
ID: 31578430
Thanks a lot
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question