Page is a not externally linkable
- Hardware and OS Related Technologies
-- Linux, Unix, and *nix like Operating Systems
---- Cronjob


lammert - 6:14 pm on Jun 3, 2011 (gmt 0)


The second part is to put the output of the commands in a log file. 1 and 2 are the stream numbers of the stdout and stderr output streams where all common programs write their output. With an interactive terminal session, these two streams are connected with the terminal of the user. With a cronjob, there is no terminal assigned and the information is lost, unless it is redirected to a file or other stream.

The 1>&2 part first combines the two streams to one data stream and the >> /custom/tmp/projectname_cron.log part appends the information to the log file.


Thread source:: http://www.webmasterworld.com/linux/4321585.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com