Solved

reminder script

Posted on 2009-05-06
4
317 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses how to implement server side field validation and display customized error messages to the client.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

739 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