Results 1 to 2 of 2
Jun 1, 2012, 13:04 #1
CRON or automated task to execute scripts
I have a number of PHP scripts that I wrote that I use to compile information across the web. I have an unique script for each page that I attempt to get information from, however, since I am trying to execute numerous scripts in a single cron task, it looks like the script is erroring out (and not telling me why).
This is my current script that I have running every night:
Each of the three scripts are also executable by just visiting through a browser, but they typically take too long to execute or error 500 out.
What is the correct way to mimic viewing a page through an automated task?
Jun 1, 2012, 13:13 #2
- Join Date
- Aug 2008
- The Netherlands
- 136 Post(s)
- 2 Thread(s)
Since you do this in a cron job I'd go for curl or wget. No need to fire up PHP for this.
multiple runs are run independently of each other so if one of them crashes all the others still go through.
!#/bin/sh /path/to/curl http://site.mine.com/pages/param1 >> command1 /path/to/curl http://site.mine.com/pages/param2 >> command2 /path/to/curl http://site.mine.com/pages/param3 >> command3Rémon - Hosting Advisor
Minimal Bookmarks Tree
My Google Chrome extension: browsing bookmarks made easy