Server Administration
  Home arrow Server Administration arrow Page 2 - Introduction to crontab
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
JMSL Numerical Library 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
SERVER ADMINISTRATION

Introduction to crontab
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2003-06-03

    Table of Contents:
  • Introduction to crontab
  • Sending the output
  • Thats all

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introduction to crontab - Sending the output


    (Page 2 of 3 )

    In some cases you need to be emailed the output for the program. in this case you would put:

    *10/ * * * * <command> >/somedir/.output 2>&1 
    | /somedir/some_program_to_send_mail /somedir/.output | rm /somedir/.output

    Note that the preceeding should be entered on one line.

    In other cases you don't want the output so you would put:

    *10/ * * * * <command> >/dev/null 2>&1

    Real uses

    A very nice real use is in FreeBSD you can update the ports database by putting this in the crontab:

    * * *1/ * * cvsup -g -L 2 /root/ports-supfile >/dev/null 2>&1

    Notice: To use this you must copy /usr/share/examples/cvsup/ports-supfile to /root/ports-supfile

    Another one:

    * * *1/ * * fetch http://yoursite.com/clearshoutbox >/dev/null 2>&1

    More Server Administration Articles
    More By Codewalkers


       · A safe place to experiment with crontab commands is Cron Sandbox at HxPI (...
     

    SERVER ADMINISTRATION ARTICLES

    - Implementing an Information Security Managem...
    - HTTP State Management with Cookies
    - Information Security Standards
    - IP Network Scanning and Security Reconnaissa...
    - An Overview of Open Source Security
    - An Overview of Free Network Scanning Tools
    - Information Security: A Coherent Approach
    - Advanced IP Network Scanning Methods
    - Using Emulation and More to Analyze Network ...
    - Third Party IP Network Scanning Methods
    - Methods of IP Network Scanning
    - IP Network Scanning
    - sendmail Security Options
    - Security Features of sendmail
    - Handling sendmail Permissions






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway