Solved

How to setup a crontab?

Posted on 1998-06-21
6
349 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
Technology Partners: 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 50 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

726 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