how to run my function using cron or anything else |
[eluser]dhananjay[/eluser]
i have created a function in one of my controller now i want it to run daily..... i m using hostgator they provide option to set up cron job but there they require path of file , i dont get how i can specify my url to be run..... Any help will be much appreciated.....
[eluser]Clooner[/eluser]
[execute php filepath] /[codeigniterproject]/index.php controller method
[eluser]PhilTem[/eluser]
This http://www.adminschoice.com/crontab-quick-reference plus what @Jeroen Schaftenaar posted above should be some help for you!
[eluser]dhananjay[/eluser]
i m not using index.php in url in config file i have also made it empty string so do i need to include index.php
[eluser]dhananjay[/eluser]
/public_html/clients/the-school-shop/index.php/newsletter/sendnewsletters: No such file or directory getting this error
[eluser]Clooner[/eluser]
I guess you don't get the concept of a cron job yet ![]()
[eluser]dhananjay[/eluser]
so lets i want to create a function to send newsletter how i should do this or setting wget where i can do this in my hosting?
[eluser]dhananjay[/eluser]
now i have set this and getting this errror /bin/sh: public_html/clients/the-school-shop/index.php: Permission denied have set this in cron /public_html/clients/the-school-shop/index.php newsletter sendnewsletters
[eluser]Clooner[/eluser]
[quote author="dhananjay" date="1343576896"]now i have set this and getting this errror /bin/sh: public_html/clients/the-school-shop/index.php: Permission denied have set this in cron /public_html/clients/the-school-shop/index.php newsletter sendnewsletters[/quote] As before you have to call the php executable like so! Code: /usr/bin/php /public_html/clients/the-school-shop/index.php newsletter sendnewsletters again, the php location can differ so contact your host about that one!
[eluser]dhananjay[/eluser]
i had set up it like this php/***/***/public_html/clients/the-school-shop/index.php newsletter sendnewsletters and i think it called and what i get on my cron job notification is whole home page html of my website but i dont get newsletter in my email...... |
Welcome Guest, Not a member yet? Register Sign In |