Cron Job - 写两个文件

I have the following cron job in DreamHost which runs Test1.php and writes to Test2.php:

 /usr/bin/php /home/Test15/Web/Test1.php>              
 /home/Test15/Web/Test2.php 2>&1

How can I make this write to a second file?

Have your Test1.php use fopen or file_put_contents to write to a second file.

You can use use the command tee. Type in the shell man tee for more information. In you case, if we assume the second file is here /home/Test15/Web/Test3.php, you can use that:

/usr/bin/php /home/Test15/Web/Test1.php | tee /home/Test15/Web/Test2.php /home/Test15/Web/Test3.php

That should redirect the output to both files.