RESTful Cron |
[eluser]CI Lee[/eluser]
Hello All, Have any of you worked with Cron and CI before? I have a question regarding how one would have the cron hit a file in CI. Code: /cron/parse/password Can anyone post their cron to line here to show an example? Thanks -Lee
[eluser]Michael Wales[/eluser]
Review this wiki page, which allows you to utilize CodeIgniter without using the HTTP connection: http://codeigniter.com/wiki/Category:Adv...ronScript/ You would then just call a Class->method($params) via the URL as normal. This cron line would call the URL at hour 13 (1:00PM) every day. Code: 0 13 * * * wget http://yourdomain.com/cron/parse/password To run an hourly cron, select a minute value (this example uses 30, and would run at the bottom of every hour): Code: 0 * * * * wget http://yourdomain.com/cron/parse/password
[eluser]CI Lee[/eluser]
Yes I had looked at that however wget fetches that page to your server which is not a big deal but... I was looking for a way to either send it to dev>null or maybe an external service.
[eluser]Michael Wales[/eluser]
Code: 0 * * * * wget -O /dev/null http://yourdomain.com/cron/parse/password 2> /dev/null
[eluser]lifewithryan[/eluser]
I believe that there is also Code: wget --delete-after |
Welcome Guest, Not a member yet? Register Sign In |