sometimes the psybnc process killed or crashed, so if you're not around you'll not be able to run your psybnc without defining cronjob
there's a file in your psybnc folder called psybncchk to check that your psybnc is running and if it is not running, the crontab will initialize the process again
crontab for psybnc 2.3.2-7
1. edit the psybncchk file:
---
#!/bin/sh
# This is the crontab script for psybnc.
#
# Please change the following path to your psybnc-directory.
PSYBNCPATH=/path-to-your/psybnc
# the rest should be kept as is
if test -r $PSYBNCPATH/psybnc.pid; then
PSYPID=$(cat $PSYBNCPATH/psybnc.pid)
if $(kill -CHLD $PSYPID >/dev/null 2>&1)
then
exit 0
fi
fi
cd $PSYBNCPATH
./psybnc &>/dev/null
---
2. chmod 700 psybncchk
#this will change permission to the psybncchk file
3. then define the crontab using command: crontab -e
0,10,20,30,40,50 * * * * /path-to-your/psybnc/psybncchk >/dev/null 2>&1
#to list your cronjob, check using crontab -l
http://pastebin.ca/678613
Showing posts with label crontab. Show all posts
Showing posts with label crontab. Show all posts
Sunday, September 2, 2007
::changing default editor::
#default editor in UNIX/Linux is usually vi, but you can change the default editor to pico/nano/vim using this command:
export EDITOR=pico
#or
export EDITOR=nano
#or
export EDITOR=vim
#you may then edit your crontab using your preferred editor
crontab -e
export EDITOR=pico
#or
export EDITOR=nano
#or
export EDITOR=vim
#you may then edit your crontab using your preferred editor
crontab -e
Thursday, August 30, 2007
::crontab::
[22:23] * DigitallyBorn (~ricky@72.236.65.199) has joined #linux
-
DigitallyBorn is ~ricky@72.236.65.199 * ricky
DigitallyBorn on #linux #C#
DigitallyBorn using punch.va.us.dal.net Experience comes from bad judgement.
DigitallyBorn End of /WHOIS list.
-
[22:23] I'm having problems with a cronjob being run .. does cron keep a log file I can view?
[22:24] * The_Machine (~The_Machi@65.91.185.36) has joined #linux
[22:24] crontab -l
[22:25] <@KeyLimePirate> keep: No, he asked for a log file
[22:25] <@KeyLimePirate> /var/log/cron
[22:25] oh thanks
[22:25] <@Enchanter_tim> /var/log/messages or /var/log/cron
[22:26] <@Enchanter_tim> or even /var/log/*cron (different crons can have different logs)
[22:26] yeah .. it doesn't look like it's runnin
[22:26] .. I created the crontab as my user, should I create it as root?
[22:26] .. I kind of assumed that it would run all users' crontabs
[22:27] * pcrack (~pcrack@122.53.134.47) Quit (Read error: Connection reset by peer)
[22:28] DigitallyBorn, no shouldn't be root unelss it needs to me
[22:28] user can create their own crontab
[22:29] yeah .. and I created it as a user
[22:29] if they are in cron.allow
[22:29] DigitallyBorn, the only things that should be run as root are things that must
[22:29] Cancel: Yeah .. I got that as a general rule of thumb ..
[22:29] DigitallyBorn, no different for cron jobs
http://pastebin.ca/675830
-
DigitallyBorn is ~ricky@72.236.65.199 * ricky
DigitallyBorn on #linux #C#
DigitallyBorn using punch.va.us.dal.net Experience comes from bad judgement.
DigitallyBorn End of /WHOIS list.
-
[22:23]
[22:24] * The_Machine (~The_Machi@65.91.185.36) has joined #linux
[22:24]
[22:25] <@KeyLimePirate> keep: No, he asked for a log file
[22:25] <@KeyLimePirate> /var/log/cron
[22:25]
[22:25] <@Enchanter_tim> /var/log/messages or /var/log/cron
[22:26] <@Enchanter_tim> or even /var/log/*cron (different crons can have different logs)
[22:26]
[22:26]
[22:26]
[22:27] * pcrack (~pcrack@122.53.134.47) Quit (Read error: Connection reset by peer)
[22:28]
[22:28]
[22:29]
[22:29]
[22:29]
[22:29]
[22:29]
http://pastebin.ca/675830
Subscribe to:
Posts (Atom)