Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My cron job, command looks similar to this:

wget -q http://whatever-url/

It is running correctly (every minute). Problem is that it is creating empty php files at my root for every minute it runs. I'm not familiar with cron job commands. Is there a cron command that keeps this from happening, but will not alter the way script runs?

share|improve this question
How did you add the new cron job and how exactly does it look? – Radu Rădeanu Nov 13 '13 at 15:21

So tell wget not to output.

wget -qO /dev/null http://whatever-url/
share|improve this answer
The OP said: "Problem is that it is creating empty php files" – Radu Rădeanu Nov 13 '13 at 16:28
@RaduRădeanu Yeah, I'm assuming a Wordpress behind-the-scenes script (per the URL that I've just edited out because it looked spammy) wouldn't need to output that much so that would leave an empty .php file. That's fairly common when you're writing a script that's only purpose is to be called from cron. – Oli Nov 13 '13 at 16:30
so basically i shouldn't set cron to run "all" (per minute) when i only want to run something once every 12 or 24 hours or so. i basically am just following the 'instructions' of the product. – alx Nov 13 '13 at 16:47
@alx That's not what I'm saying at all. I'm saying that if you're making requests to a file that you don't want to download, you should tell wget to not save the output. The default is to save and that's why you've got files popping up. – Oli Nov 13 '13 at 16:51
thanx for responding - oh okay, so the wget -qO will do that. (incidentally, that's an alpha "O" right? not zero) at first, the command line looks like it is just to disable completely. so it is to disable 'saving' of output. yes? sorry if i sound like a dufus, i don't know cron at all, i can draw with crayons and know a little html and php is about it for me. – alx Nov 13 '13 at 16:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.