php - Cronjob linux server logging -


i have cronjobs running on linux server. these cronjobs executing php scripts. want log possible outputs these scripts have given.

i want use output given command:

wget -o /logs/logfile /pathofthefolder/script.php 

the problem command overwrites previous logfile, logfile contains output of last execution, kinda useless logging.

i tried adding -a appending instead of overwriting, didn't work.

i tried -a this:

wget -a /logs/logfile http://example.com/script.php 

but didn't work, information of download in logfile such:

-2014-05-27 21:41:01--  http://example.com/script.php resolving example.com (example.com)... [ip address of site] connecting example.com (example.com)|[ip address of site]|:80... connected. http request sent, awaiting response... 200 ok length: unspecified [text/html] saving to: `script.php.4'      0k 

so information of http request being stored in logfile, , output of every request saved in seperate file increasing numbers, script.php.1, script.php.2 , on. isn't quite want, i'd prefer have in 1 file, don't need http info.

update: know easier via php or lynx command, commands not installed on server. i'm kinda stuck wget.

you can use this:

wget -qo- "http://example.com/script.php?parameter=value&extraparam=othervalue" >> /logs/logfile  

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -