Hi
You have seen some sites email members that their account is going to expire in 1 week send email notifications.
Do that sites check the whole database everyday?
secondly, how to send mass mail with php?
thanks
doing a cron job (5th post)
Moderator: General Moderators
doing a cron job (5th post)
Last edited by m2babaey on Tue Jul 24, 2007 6:09 am, edited 1 time in total.
thats what the cron job would do..
http://en.wikipedia.org/wiki/Cron
just write a php script that does a check for the accounts . .and call that script with a cronjob that will run daily or whenever you want
http://en.wikipedia.org/wiki/Cron
just write a php script that does a check for the accounts . .and call that script with a cronjob that will run daily or whenever you want
Thanks ( first i thought cron means stupid!
)
I saw cron job in my cpanel
There I can choose the time for the job. and just remains the command input field.
It that going to be filled with a sql statement?
please give me a sample command line assuming database articles with username: m2babaey and password: pass123
I really need it
I wish I could insert the following code in the command field:
Is it possible?
and one other thing will I need swift mailer If I use cron job to mail?
Thanks
I saw cron job in my cpanel
There I can choose the time for the job. and just remains the command input field.
It that going to be filled with a sql statement?
please give me a sample command line assuming database articles with username: m2babaey and password: pass123
I really need it
I wish I could insert the following code in the command field:
Code: Select all
<?php
$result=mysql_query("select* from table where expiredate-7<now()");
while($row=mysql_fetch_array($result)){
mail( $row['email'] , "Reminder" , "Please act for rebilling ASAP" , "admin@billing.com");
}
?>and one other thing will I need swift mailer If I use cron job to mail?
Thanks
Last edited by m2babaey on Tue Jul 24, 2007 6:27 am, edited 1 time in total.
Put something similar in your command field
The first part should be the path that contains your php executable, the second part should be the absolute path to the php cron script.
Code: Select all
/usr/bin/php /path/to/cron.phpSet Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.