1

when running a cron job like this:

curl http://example.com/cronjob.php

The output email contains this:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed

 0    52    0    52    0     0     81      0 --:--:-- --:--:-- --:--:--    81
 0    52    0    52    0     0     31      0 --:--:--  0:00:01 --:--:--     0
 0    98    0    98    0     0     37      0 --:--:--  0:00:02 --:--:--    23
 0    98    0    98    0     0     27      0 --:--:--  0:00:03 --:--:--    15
 0    98    0    98    0     0     21      0 --:--:--  0:00:04 --:--:--    11
100   144    0   144    0     0     25      0 --:--:--  0:00:05 --:--:--    18
100   144    0   144    0     0     21      0 --:--:--  0:00:06 --:--:--    18
100   190    0   190    0     0     23      0 --:--:--  0:00:07 --:--:--    17
100   190    0   190    0     0     21      0 --:--:--  0:00:08 --:--:--    17
100   236    0   236    0     0     24      0 --:--:--  0:00:09 --:--:--    27

I find this totally useless and would prefer just the code output. Is there any way to disable this?

I don't get this if the cronjob is run like below:

php /path/to/the/phpfile.php

But right now, I do not have a choice but to use curl.

2
  • What does your PHP script do? Commented Jun 4, 2010 at 18:25
  • It makes a lot of API calls and stores the data to a database. Commented Jun 4, 2010 at 18:34

1 Answer 1

4

Have you tried invoking curl with --silent?

curl --silent http://example.com/cronjob.php

or

curl -s http://example.com/cronjob.php

from the manpage:

-s/--silent

Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.