Server Administration

  Home arrow Server Administration arrow Page 2 - Introduction to crontab
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

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    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

    blog comments powered by Disqus

    SERVER ADMINISTRATION ARTICLES

    - Server Responses to Client Communication
    - Authentication in Client/Server Communication
    - Client/Server Communication
    - Understanding Awk in the UNIX Shell
    - Stream Editor in the UNIX Shell
    - Processes in the UNIX Shell
    - Migrating from Windows to Wine
    - Wine: Not Another Emulator
    - Preventive Measures to Block SSH Attacks
    - Monitoring Temperatures with Cacti
    - Cacti: RRDTool-based Graphing Solution
    - Network Magic 5.0 Review
    - Netfilter and Iptables Overview
    - Installing and Configuring Squid
    - Clickfree PC Backup Systems Compared


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap