Skip to content

Instantly share code, notes, and snippets.

@0xallie
Last active August 29, 2015 14:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save 0xallie/cd94d838aa12023e5249 to your computer and use it in GitHub Desktop.
Script to run supybot-botchk in crontab

Make sure to configure the pidfile in your bot before adding this script to crontab, or else it will spawn lots of copies!

config pidfile botname.pid
flush

Edit the script and fill in the bot's directory, pidfile and config file. Then put something like this in your crontab:

*/5 * * * * /home/botname/supybot-botchk-cron
#!/bin/sh
export PATH="$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin"
export TZ="UTC" # or "Region/City" (e.g.: "Europe/London") - check in /usr/share/zoneinfo
supybot-botchk --botdir="/home/botname/" --pidfile="botname.pid" --conffile="botname.conf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment