Solved

How to setup a crontab?

Posted on 1998-06-21
6
329 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
6 Comments
 
LVL 1

Expert Comment

by:ragnar
Comment Utility
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
Comment Utility
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
Comment Utility
Which version of UNIX?

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


0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:dima_sherman
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now