Jump to content

Sendmail on certain days via cron job


joshuaer

Recommended Posts

Hello I have a forum that members fill out to have reminders sent to them on certain days that I am working on. I am trying to figure out how to make these reminders only send out on the days the members specify in the forum is there a way that the cron job can run check the days stored in mysql database against the current day and then if it is suppose to send that day send out the reminder? Thanks

Link to comment
Share on other sites

cron job is just a schedule task which runs periodicaly to execute certain scripts. The script will be a usual php script which can do anything you want them to do. you can query the DB from the script and do certain task.

Link to comment
Share on other sites

if your date time is stored as timestamp you have to create a timestamp range and check against database which entries comes between this. if it is date time object in DB you can use several date functions in php to find the matches.

Link to comment
Share on other sites

Thanks for the reply birbal, if you cant already tell I am fairly new to php and mysql. do you have an example of this I can look at or maybe a link to a website that has an example. I have beel looking around for several days and cannot quite seem to find what I am looking for Thanks again

Link to comment
Share on other sites

if you have come up with any code that will be better to work forward from that. and how is your dates stored in db?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...