I have some functions that use curl to pull information off a couple of sites and insert them into my database. I was just wondering what is the best way to go about executing this task every 24 hours?
I am running off windows now, but will probably switch to linux once I am live (if that makes a difference). I am working inside symfomy framework now.
I hear cronjobs can do this this...but looking at the site it seems to work remotely and I would rather just keep things in house...Can i just "run a service" on my computer? whatever that means ;) (have heard it used)
thanks for any help, Andrew
This is exactly what Cron (linux) or Scheduled Tasks (windows) are for.
You can run them on your application server to keep everything in one place.
For example, I have a cron running on my home server to backup its MySQL databases every day. Only one system is involved in this process.
Adding 0 0 * * * php /path/to/your/cronjob.php
to your crontab should accomplish this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With