tags:

views:

28

answers:

2

I never used CRONs and I don't know hot to set up one so I use online cron websites to do it. Now I'm using http://www.setcronjob.com/ free account for testing.

I use this service to run a script that fetches data from the web. The script uses PHPs file_get_contents and cURL.

I want to know if running a CRON is behaves the same way as running a script in the browser and the problems that can occur because I think the script I'm running behaves a little different...

+1  A: 

Cron (not CRON) runs a script from the command line. It doesn't set any of the usual HTTP server environment variables, and does pass in any that are in the execution environment. (Unless the cron job runs a program that makes an HTTP request to the webserver to run the server side program, of course).

David Dorward
A: 

Running a cron job is more akin to running a script inside a server shell. The script (cron job) can run as many operations as you need it to. It can be any type of file/command(s) that your server knows how to run.

Michael