|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cron creating a blank file
I have a php script running under a cron job like so:
wget http://www.mysite.com/script.php Everytime the cron runs, I get a script.php.{number} file in my root directory. The number starts at blank and is increased by 1 everytime the cron runs. The file is completely blank. My script isn't returning any errors when run from my browser. Could someone please explain what's going on here? Thanks. |
|
#2
|
||||
|
||||
|
Are you triggering the script via wget or does cron call wget?
Anyway, my guess is that your user permissions are wrong, and the apache / webserver user (usually 'nobody') can't write to the root directory. Try running the script from a terminal, and see what error you get. --Simon
__________________
|
|
#3
|
|||
|
|||
|
If I trigger the script in a terminal using wget (any PHP script on my site), then the "ghost" file appears. I'm giong to look into a different way to use wget.
|
|
#4
|
|||
|
|||
|
The --delete-after option is deleting he file after its done running the script. Apparently it was creating the file as part of the cache.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Cron creating a blank file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|