Click here to Skip to main content
15,746,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ...... The code is in CodeIgniter ...
Cron job is not executing my javascript in PHP view page ,when I am assigning controller function and on the same time i am calling View Page(contains Javascript code ) ,after cron job done javascript was not executing in View page please help out .

Hi this is a function i am calling in cron job

public function connect()

foreach($mail as $email)

//    print("<div style='display: none;'>".print_r($graph)."</div>" );
    /*print("<script>alert('<!--?php print_r($graph);?-->');</script>");*/


/*    $filename=$data['company_name'];
    $mpdf = $this->pdf->load(); 
    foreach($image1 as $row)
    $config = array();
                                        $config = $this->mail_config();
                                        $config['mailtype'] = "html";
                                        $this->email->subject("Weekly Report");
                                        $mpdf = $this->pdf->load(); 

                                 //$mpdf->Output($pdfFilePath, 'F');
					$data['success'] ='<p class="email_sent">An email has been sent to you </p> 
                    <p>If you have not received the email:</p> 
                    <li >Please Try to look at it in your spam email box.</li>
                    <li>If it is still not found, you may try to submit the form again to resend it.</li>
                    <li >If the problem persists, please contact us on<a href="" style="text-decoration:none;"><span style="color:#25a8e0;"><span></a></li>
                                            //print_r($data); exit;

This function manually works without cron job ... when i assign this to cron job it wont work .. please help me
Updated 23-Sep-14 3:15am
Richard MacCutchan 23-Sep-14 8:07am    
This is not a good question. No one can guess what may be happening on your system.
Richard MacCutchan 23-Sep-14 9:17am    
You need to collect more information, and please add it to the question. What is the code that runs this from cron, what results do you see?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900