My site is hosted by a hosting company which does not allow me to access the normal cron logs. I want to redirect the output and error messages to a log file in my user space. My cron commmand is
/usr/bin/curl -s "http://my/path/to/updateWebsite.php" > dev/null

I want to send the output echos and error messages to my/path/to/updateWebsite.log . Tutorials I have looked at indicate to use
/usr/bin/curl -s "http://my/path/to/updateWebsite.php" > "http://my/path/to/updateWebsite.log" 2>&1
but I cannot make this work. Can someone help me with the correct syntax?

Recommended Answers

You may need to modify the PHP file to directly write to the desired file.

Jump to Post

All 2 Replies

You may need to modify the PHP file to directly write to the desired file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.