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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.