title: Apache httpd rotatelogs: is it possible to create a new file every day?
body: <p>I want to make a new logs for my website every 00:00:01 (= each new day).</p>
  
  <p>The problem with rotatelogs is that you can either precise the max size of the logs before creating a new one, or precise the rotation time in seconds. It's not possible to precise <em>an hour</em> of rotation.</p>
  
  <p>They talk about "cronjobs", but I don't get it. Could someone please explain if it's possible, and if so, give an example?</p>
  
  <p>Thank you very much</p>
  
  <p>Following is the help of the <code>rotatelogs</code> utility:</p>
  
  <blockquote>
    <p>/ # /opt/httpd/bin/rotatelogs --help Incorrect number of arguments
    Usage: /opt/httpd/bin/rotatelogs [-l] [-f]  {|} [offset minutes from UTC]</p>
    
    <p>Add this:</p>
    
    <p>TransferLog "|/opt/httpd/bin/rotatelogs /some/where 86400"</p>
    
    <p>or </p>
    
    <p>TransferLog "|/opt/httpd/bin/rotatelogs /some/where 5M"</p>
    
    <p>to httpd.conf. The generated name will be /some/where.nnnn where nnnn
    is the system time at which the log nominally starts (N.B. if using a
    rotation time, the time will always be a multiple of the rotation
    time, so you can synchronize cron scripts with it). At the end of each
    rotation time or when the file size is reached a new log is started. /
    #</p>
  </blockquote>