?
Solved

How to setup a crontab?

Posted on 1998-06-21
6
Medium Priority
?
360 Views
Last Modified: 2010-04-21
Hi, i tried to run a crontab on my eggdrop, i did &
followed the btochk script, but when the system reboot the pid file stay in the library and the bot doesn't come back.
Help me setup it, maybe i have errors maybe my botchk bad. Thanks.
0
Comment
Question by:dima_sherman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 1

Expert Comment

by:ragnar
ID: 2008105
type crontab -l and it will list what cron jobs are in the memory.  this might help you debug the problem.  i'm assuming you did the standard command

% crontab cronfile

where cronfile is the name of your cron commands?  hope this helps point you in the right direction.
0
 

Expert Comment

by:firefox032697
ID: 2008106
What is a bot / btochk?
What version of Unix?
Which library are you refering to is it the /proc (or equivalent) directory?

What process does the pid refer to? Is it a task called cron?

In short can you provide a little more detail?

Possibly the bot does not come back because the time that cron is told to schedule the task was either just before cron started or is well in to the future.

Typically cron is used to start background tasks at regular intervals (eg. Every Sunday night at 9PM). If you were wanting to start a job after a reboot, you might consider /etc/init.

Again, more details please?
0
 
LVL 2

Expert Comment

by:richrussell
ID: 2008107
Which version of UNIX?

Depending on version it can be as simple as adding script files to directories (cron_daily etc.).


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dima_sherman
ID: 2008108
NO NO NO, i did $ crontab 0,10,20,30,40,50 * * * *   /home/zer0c0ol/eggdrop1.1.5/botchk >/dev/null 2>&1
-------
Like it says in readme & botchk.
The bot comes back only if the IRC || the pipe broken or something.
If the system reboots the pid.LameBot stays and the comp think the
bot is online (i think so...)
0
 

Author Comment

by:dima_sherman
ID: 2008109
p.s there is no matter what Unix Os or system i know that crontab appears there. . . i have 10 diffrent unix oses i ask globally. thnaks.
0
 
LVL 3

Accepted Solution

by:
rjhawkin earned 100 total points
ID: 2008110
Try this,
Put a file in your home directory, for example 'cron-run'
edit cron-run with your favorite editor to contain the command that you want to run, exactly like you would type it on the command line. Just like a Shell Script:

#/bin/csh
/home/zer0c0ol/eggdrop1.1.5/botchk >/dev/null 2>&1


'chmod 700 cron-run'
make sure that '/home/zer0c0ol/eggdrop1.1.5/botchk' is 700 as well.
type 'crontab -e'

Into the temp file that opens, put your one line:


0,10,20,30,40,50 * * * * cron-run

Write the file and exit.

I believe cron assumes your home dir, but it been awhile sime I've set up any jobs.
Also depending on the version of *nix that the job will be running on you can replace 0,10,20,30,40,50   with  */10     meaning every 10th minute
See 'man 5 cron' for more information

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question