Page 1 of 1

Confirming cron command w/php & Sending Mail Via Cron

Posted: Tue Dec 05, 2006 11:16 pm
by jbh
Hey,

When using a php page to be activated via cron, do I have to use any prefixes such as
-q or /path/to/php before the path to the file, such as

/path/to/php /home/public_html/wwwsite/cronpage.php ?

Also, if I were to use swiftmailer, or any mailer for batch email via cron, is it recommended to sleep 10-30 seconds
during each loop through a database record? Or should it sleep a minute+ before sending another batch? (for instance, up to 100 emails at a time
if the shared server allows it (mine allows 1k)

Thanks

Re: Confirming cron command w/php & Sending Mail Via Cro

Posted: Tue Dec 05, 2006 11:21 pm
by John Cartwright
jbh wrote:Hey,

When using a php page to be activated via cron, do I have to use any prefixes such as
-q or /path/to/php before the path to the file, such as

/path/to/php /home/public_html/wwwsite/cronpage.php ?

Also, if I were to use swiftmailer, or any mailer for batch email via cron, is it recommended to sleep 10-30 seconds
during each loop through a database record? Or should it sleep a minute+ before sending another batch? (for instance, up to 100 emails at a time
if the shared server allows it (mine allows 1k)

Thanks
I don't think so, although I havn't really looked into it. The real reason I posted was if you are using SwiftMailer you can use it's AntiFlood plugin.

Posted: Tue Dec 05, 2006 11:30 pm
by jbh
Yeah, I am going to use that ,actually. And test it tonight. I guess I just tell it to batch x # and pause every y seconds.


As for the cron ,I've searched (and other boards) and get conflicting responses to control panel cron syntax, if the php path is necessary or using -q

What do you recommend?

Thanks