Hi, I have a page that sends an email to anyone that has chosen to receive emails alerts. The way the page is set-up at the moment is every time someone posts a new item a email is sent to the users who want to receive emails. The way i want it to work is for the email to be sent once a day at a certain time with all the items that have been posted that day. So that the user does not receive e.g. 10 emails the same day and just receives one with all that days information. Cheers, Adam
I think that you are asking how to set up timed events. This probably depends on how you are hosting your site. If this is being hosted by a unix/linux server you can set up a cron job to execute a script at a given time. To do that you'll need either shell (via ssh or telnet or something) or an administrative gui that lets you edit cron entries. If you are doing this from a shell you can run "crontab -e" to edit your cron jobs. An example cron entry might be executed everyday at 2:30am: 30 2 * * * /home/myusername/www/sendEmailsNow.php And then put your email code into /home/myusername/www/sendEmailsNow.php If this isn't unix/linux though, well then cron isn't going to help you
hi, you can probably do this through cron, just create a script and schedule it to run once a day. If you need this done for you, i can probably help
Hmmm... I have never done cron jobs before.. I am using a linux server though so should be able to pick it up. Can anyone point me in the right direction on where to learn how to do this?
hmm, i'm not sure if i'm allowed to post links here so i suggest you use google and search for cron job
Have a look at your cPanel. Usually there's an option to set cron jobs. And it's easier this way too. (In most cases)