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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
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

    - 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
    - Squid, the Caching Proxy
    - Regular Expressions in the Unix Shell
    - Source Code Version Control Solutions
    - OTRS: Open Source Ticket Request System
    - Clonezilla: Free Mass Disk-Cloning Utility





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek