Operating System - HP-UX
1752809 Members
5934 Online
108789 Solutions
New Discussion

Re: Edit cron without using crontab -e

 
SOLVED
Go to solution
chindi
Respected Contributor

Edit cron without using crontab -e

We have observed one strange issue regarding one of our cron job for a user.

which gets automatically unhashed ?  hpux 11.31

Hows it possible without using crontab -e ? Is there any way we can do it ?

We have traced its history files where we have searched for "crontab" command used if any but we couldnt find anything.

5 REPLIES 5
Steven Schweda
Honored Contributor

Re: Edit cron without using crontab -e

> We have observed one strange issue regarding one of our cron job for a
> user.

   And what, exactly, is this "issue"?

> which gets automatically unhashed ? [...]

   Huh?  What, exactly, are you doing?  What, exactly, happens when you
do it?

> Hows it possible without using crontab -e ? Is there any way we can do
> it ?

   How is _what_ possible?  Not using "crontab -e"?  Perhaps.  Why not
use "crontab -e" (which does all the work automatically)?

   If you edit a crontab without using "crontab -e", then you need to
tell cron to look (again) at the crontab.  The traditional way to do
this is:

      kill -HUP <cron_pid>

where <cron_pid> is the process ID of the cron program.  "ps" can find
it.

      man cron
      man ps

> We have traced its history files where we have searched for "crontab"
> command used if any but we couldnt find anything.

   Huh?

   Whether or not English is a second language, showing actual commands
with their actual output can be more helpful than vague descriptions or
interpretations. 

Dennis Handly
Acclaimed Contributor

Re: Edit cron without using crontab -e

>which gets automatically unhashed

 

What do you mean by unhashed?  Deleted?

chindi
Respected Contributor

Re: Edit cron without using crontab -e

I mean it is disabled.

Dennis Handly
Acclaimed Contributor
Solution

Re: Edit cron without using crontab -e

Is the file missing from /var/spool/cron/crontabs/ ?

If nobody added a new one, the modification date on that directory may tell you something.

Steven Schweda
Honored Contributor

Re: Edit cron without using crontab -e

> I mean it is disabled.

   Only you seem to know what that means.  As usual, whether you believe
it or not, showing actual commands with their actual output can be more
helpful than vague descriptions or interpretations.

   I'm still guessing (based on no evidence) that the problem here is
the common one, where someone added a line to a crontab using some means
other than "crontab -e", and that new line is being ignored by cron.
But explanations like "which gets automatically unhashed ?" or "it is
disabled" (with no clue as to what "which" or "it" might be, or what
"unhashed" or "disabled" might mean) leave me mystified.