As D say, the REQUEST and SERVER globals mostly refer to apache, so they are basically blank. You can use the $_SERVER['argv'] to get parameters passed to the script FROM the command line, say you wanted that 5 days to be different on different crons, or different months....

The other thing you MAY need to be aware of is the set_time_limit defaults to infinite, despite what is in the php.ini so you need to explicitly set it.