Sign up to create your own snipts, or login.

Public snipts » robertbanh's snipts » shell The latest shell snipts from robertbanh.

showing 1-2 of 2 snipts for shell
  • Cron job example
    # This will kick off a cron job at 2:07am.
    
    which $EDITOR
    EDITOR=vi
    export EDITOR
    
    crontab -e
    
    MAILTO="bbb@bbb.com"
    7 2 * * * /usr/local/bin/php -f /home/bbb/cron.php
    
    
    crontab -l
    

    copy | embed

    0 comments - tagged in  posted by robertbanh on Feb 17, 2010 at 2:45 p.m. EST
  • Set up mail forwarding on linux
    # add a .forward file to your home directory
    touch .forward
    
    # add your email address
    vi .forward
    <user>@<mail>.com
    
    # change permission else it won't work
    chmod 600 .forward
    
    # test mail send, replace 'user' with your login
    mailx -s 'test from cluster' user < /dev/null
    

    copy | embed

    0 comments - tagged in  posted by robertbanh on Dec 17, 2009 at 10:19 a.m. EST
Sign up to create your own snipts, or login.