how can i check cron tab log |
[eluser]Angel Lay[/eluser]
Hello I want to create cronjob that i never try before. I created cron.php. The content is below: Code: <?php reference : http://ellislab.com/forums/viewthread/201824/#995592 The things i have done in crontab /usr/bin/php -q /var/.../myroot/cron.php But, it seems not working.Is there anything wrong? how can i check log or something else that show the error? I use Plesk Control Panel. Thanks.
[eluser]vrencianz[/eluser]
Maybe this helps: http://ellislab.com/forums/viewthread/215821/ Also you can use Code: /usr/bin/php -q /var/.../myroot/cron.php 2>&1 >> /var/log/your_log.log To redirect all output (errors and echoes) to the /var/log/your_log.log file
[eluser]weboap[/eluser]
what i have done before and worked for me is : created the the controller thats supposed to do some job i take your example : http://test.com/controller/method then in the cron job you will have to reference it by its real path eg : /home/~username/public_html/application/controllers/controller/method that will give : Code: php -q /home/~username/public_html/application/controllers/controller/method 2>&1 >> /var/log/your_log.log and it's important that the cron job run as the user owner of the file. hope it help.
[eluser]Angel Lay[/eluser]
mystructure is eg : /home/~username/public_html/mysubfolder/mysubfolder2/mycodeigniter/system/application/controllers/controller/method I tried as below: Code: php -q /home/myroot/~username/mysubfolder/cron.php 2>&1 >> /var/log/my_log.log Code: php -q /home/~username/myroot/mysubfolder/mysubfolder2/mycodeigniter/system/application/controllers/mycontroller/mymethod 2>&1 >> /var/log/my_log.log whatever, i haven't got log file and cronjob can't work.
|
Welcome Guest, Not a member yet? Register Sign In |