cron job - bash script that writes to other files

liber77

Registered
Dec 22, 2011
1
0
51
cPanel Access Level
Website Owner
I have made a bash script that writes to other files like this, and I am going to run it as a cron job.

Code:
echo string >> file
I have problems running it. Some people say that cron doesn't write to stdout. Is it possible to write to other files like this when the script is run as a cron job?
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
Hello,

A bash script can write to files according to the commands, which set as a cron job. I have seen countless such scripts, for collecting load, memory usage, cpu usage, apche request pool, etc to files.

Try to run that script manually and make sure that the cron owner have the necessary permission to write contents to the file.

Thank you,
Nibin.