altomarketing Posted May 21, 2013 Share Posted May 21, 2013 Im developing some hooks to run as DailyCronJob, but it does not work. Is there any way to detect why it is not working ? sql query works fine in phpmyadmin. code is: <?php function domainpending_sendclientmail() { # Template file name $emailtpl = "EM - Dominio pendiente"; # API Command $command = 'SendEmail'; # Admin Username or ID $adminuser = "myadminuserhere"; #todos pending. $d = mysql_query('Select * FROM tbldomains WHERE status="Pending" and registrationdate <= ( CURRENT_DATE( ) -5 )'); #make array while ($result = mysql_fetch_assoc($d)) { $domain = $result['domain']; $values = array('messagename' => $emailtpl, 'id' => $domain); $apiresults = localAPI($command,$values,$adminuser); } } add_hook('DailyCronJob', 5, 'domainpending_sendclientmail'); 0 Quote Link to comment Share on other sites More sharing options...
jljubich Posted May 21, 2013 Share Posted May 21, 2013 Have you lastly upgraded to 5.2.5?. We have upgraded to 5.2.5 last saturday and are experiencing serious troubles regarding dailyCronJob, including duplicated billing. 0 Quote Link to comment Share on other sites More sharing options...
altomarketing Posted May 21, 2013 Author Share Posted May 21, 2013 No upgrade.., im using 5.1 0 Quote Link to comment Share on other sites More sharing options...
altomarketing Posted May 28, 2013 Author Share Posted May 28, 2013 ... wait... i fixed.. i changed $domain = $result['domain']; for $domain = $result['id']; because in array 'id' is the 'domainid' , required to send emails, right 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.