Home Shell Accounts Web Hosting Dedicated Servers Order Now
 
Products & Services
  • Home
  • Shell Accounts
  • Web Hosting
  • Dedicated Servers
  • Customer Support
  • Referral Program
  • Payment Method
  • Virtual Hosts
  • Order Now

  • Uptime Status
    ENIGMATA: 67 days

    DAEMONIC: 58 days
    FRENZY: 7 days


    News / Press
    June 2, 2008 - New UK Server Online & Promotions
    May 10, 2008 - New Server Online & Promotions
    April 1, 2008 - New Shell Account Packages
    November 1, 2007 - New Server Online
    September 30, 2007 - New Server Online
    January 16, 2007 - New Dedicated Servers plans

    System Resources
  • Online Chat
  • About us
  • Servers Specs
  • Site Map
  • FAQ
  • TOS
  • Privacy Policy
  • Market Place
  • User Control Panel
  • Support Forums
  • Articles & News
  • RSS Feeds

  • Shell Account


    Past Articles
    Sunday, April 06

  • Making Money Online with PayPal (0)
  • What not to do When You're Shopping Online by Vincent Norman (0)
  • Broadband Internet Is Worthless by Aaron Siegel (0)
  • Internet Privacy Threat - Bad Phorm by Ian Davis (0)
  • IT Network Support and Solutions by Crawley Ashford (0)
  • Unblock Sites At School Very Easily by Ivan Cuxeva Jr (0)
  • Do you Understand Website Traffic by Bruce Swedal (0)

    Saturday, February 17

  • Moving To A New Web Hosting Provider by Christine Anderssen (0)
  • How To Choose A Good Domain Name by Christine Anderssen (0)
  • Dedicated Hosting Services and Virtual Private Servers (VPS Hosting) by Christ (0)

    Older Articles


  • Today's Big Story
    There isn't a Biggest Story for Today, yet.

    Would you like to chat with us online?
    Click here to open a chat window now!  
    FRENZY Shell Account & Web Hosting Services FAQ (Frequently Asked Questions)



    Category:
    Main -> Crontab Setup

    Question
  • What are the steps required to setup a Crontab job?

  • Answer
  • What are the steps required to setup a Crontab job?

    1. Notes before you begin:
      • Newer versions of Eggdrop include a script called "autobotchk" which automates setting up your crontab. It's located in the bot's scripts/ subdirectory, and is recommended if available. If not available, then the rest of this guide demonstrates how to set up crontab manually.
      • Text in BOLD means its a command to be entered into the shell.
      • On UNIX/Linux systems, all filenames and commands are CASE SENSITIVE.

    2. First, you must set up a botchk script for each bot you run on your shell, which is located in each bots' scripts/ dir. So, change to your bot's directory and with your favorite editor, open up this file:
      pico scripts/botchk

    3. Next, edit the five variables located in the script. See the example for a bot with the name "LamestBot" below:

      #! /bin/sh
      #
      # botchk
      #
      # $Id: botchk,v 1.6 2002/02/27 18:21:46 guppy Exp $
      #
      # This is a script suitable for use in a crontab.  It checks to make sure
      # your bot is running.  YOU NEED A SEPARATE CRON JOB FOR EACH BOT.  If your
      # bot isn't found, it'll try to start it back up.
      #
      # You'll need to edit this script for your bot.
      #
      # To check for your bot every 10 minutes, put the following line in your
      # crontab:
      #    0,10,20,30,40,50 * * * *   /home/mydir/mybot/botchk
      # And if you don't want to get email from crontab when it checks you bot,
      # put the following in your crontab:
      #    0,10,20,30,40,50 * * * *   /home/mydir/mybot/botchk >/dev/null 2>&1
      #
      
      # change this to the directory you run your bot from (capitalization COUNTS):
      botdir="/home/mydir/LamestBot"
      
      # change this to the name of your bot's config file (capitalization COUNTS):
      botscript="LamestBot.conf"
      
      # change this to the botnet-nick of your bot (capitalization COUNTS):
      botname="LamestBot"
      
      # change this to the name of your bot's userfile (capitalization COUNTS):
      userfile="LamestBot.user"
      
      # change this to the name of your bot's pidfile (capitalization COUNTS):
      pidfile="pid.LamestBot"
      
      ########## you probably don't need to change anything below here ##########
      

    4. Next, we want to set the script executable, if it isn't already.
      chmod 700 scripts/botchk

    5. Now we want to go back and double check your eggdrop's config file. Many people do not correctly set up the very first line, which is supposed to look like:
      #!/HOMEDIR/EGGDROPDIR/eggdrop

      This is the exact path (capitalization counts) to the eggdrop binary in your bot's directory (not the directory itself, and not the config file). Make sure to change HOMEDIR and EGGDROPDIR to match your situation, and make sure the #! is at the beginning (it has special meaning).

    6. At this point, it might be wise to test if you have everything set up correctly so far. Kill the bot, and run the botchk script.
      ps -x
      kill -9 PID
      scripts/botchk

      PID is a "Process IDentification" number for each program current running. If your botchk file is set up correctly, it will launch your bot.

    7. Next step is to set up the crontab. Open your favorite editor with a new empy file called "mycron" in your home dir.
      pico ~/mycron

    8. For each bot you run on your shell, add one of these lines:
      0,10,20,30,40,50 * * * * /HOMEDIR/EGGDROPDIR1/scripts/botchk >/dev/null 2>&1
      0,10,20,30,40,50 * * * * /HOMEDIR/EGGDROPDIR2/scripts/botchk >/dev/null 2>&1

      Each will have its own botchk file.

    9. Save and exit the editor, and set crontab to use the file you just made.
      crontab ~/mycron

    10. Lastly, kill your bot(s) again and wait ten minutes to check if they restart. If not, go back through all these steps and double check everything. If it still doesn't work, you may not have access to crontab on your shell, so check with the admin.

    11. In addition, the crontab program usually offers these useful tools:
      crontab -e
      Interactively edits your current crontab entries.
      crontab -l
      Lists all your current crontab entries.
      crontab -r
      Removes all your current crontab entries.

    Back to Top




  • Home | About | FAQ | TOS | Privacy Policy | Shell Accounts | Web Hosting | Dedicated Servers | Order | Control Panel | Site Map | News & Articles
    This site is best viewed in 800x600 or higher using Internet Explorer 5.5 or newer.
    All rights reserved © www.frenzy.biz 2002-2010

    Shell Account - Acky.net

    This is my Google PageRank™ - SmE Rank free service Powered by Scriptme hostingspeeds.com
    Page Generated in 0.785591 seconds