Updating facebook profiles |
[eluser]Jim P.[/eluser]
Has anyone been able to successfully use CI to update profile boxes for their app's users, using a cron job? I'm not sure how to call the proper controller/action using a cron to trigger the updating event. I have a url that updates all the profiles successfully, but I need to run it as a cron job. And I can't just call the index.php/util/updateProfiles from a cron because it won't be run through apache, and it thinks there is a path not CI variables. I'm now trying to just use a command line file that uses curl to call www.mydomain.com/util/updateProfiles, but it's failing. I'm assuming it's trying to flip to facebook's site from my url. Any ideas? Pulling my hair out here.
[eluser]Matthew Lanham[/eluser]
You should be able to do it with the full web address depending on how strict your host is, if not maybe you could write a php script that does a file_get_contents, this will just fire up the script you are after, make sure you use the website url in file_get_contents...
[eluser]Phil Sturgeon[/eluser]
I just use the following cron command and it seems to work fine. Quote:/usr/bin/curl -s http://site.com/controller/method |
Welcome Guest, Not a member yet? Register Sign In |