1827807 Members
2767 Online
109969 Solutions
New Discussion

Re: cron executable

 
SOLVED
Go to solution
Donald Thaler
Super Advisor

cron executable

where does the executable cron exist... i opened /var/spool/crontabs/root in a text editor (using exceed), but when i change the source it doesn't really change the executable version. i ran into this problem becuase exceed version 10 (using opentexts secure shell) opens the the crontab -e in a terminal window and not a text editor like it used to. their supposedly researching the problem, but in the interim if i need to change the crontab where would i find the executable version ?
16 REPLIES 16
Raj D.
Honored Contributor

Re: cron executable

Donald,
I think you are looking for the path for the crontab executable file:
It reside in /usr/bin/
i.e # /usr/bin/crontab

You can also type from the prompt:
$ whereis crontab


Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: cron executable

Also if cron is not running ,
do the following:
# /sbin/init.d/cron stop ### to stop cron
# /sbin/init.d/cron start ### to start cron


or type:
# /usr/sbin/cron

-to check:
# ps -ef | grep -i cron

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Patrick Wallek
Honored Contributor
Solution

Re: cron executable

>> if i need to change the crontab where would i find the executable version ?

You don't. Changing the crontab just changes the file in /var/spool/cron/crontabs/. The cron daemon then picks up the changes to the crontab file.

There is no such thing as an executable crontab file.
Steven Schweda
Honored Contributor

Re: cron executable

As usual, some minimal system info might be
nice to see.

uname -a

> [...] The cron daemon then picks up the
> changes to the crontab file.

Not without some help, it doesn't. Which is
why one uses "crontab -e" instead of simply
editing the actual crontab file.

man crontab
man cron

> [...] their supposedly researching the
> problem [...]

"They're"?
Pete Randall
Outstanding Contributor

Re: cron executable

You can also just use "crontab -l > /home/me/mycronfile" to produce an editable file of your crontab entries. Then, after you edit that file (I use vi) you just use "crontab /home/me/mycronfile" to schedule your modified crontab.


Pete

Pete
Donald Thaler
Super Advisor

Re: cron executable

the reference to they was 'opentext' who is now the supplier of exceed (formerly hummingbird)... i never knew that when you ran crontab -e that behind the sceenes it acutally ran the crontab process... so until opentext fixes their problem i have to run
crontab /var/spool/cron/crontabs/root to schedule the changes... thanks to everyone that responded
Patrick Wallek
Honored Contributor

Re: cron executable

Having just reread your initial description...

>>opens the the crontab -e in a terminal window

Are you sure that when it opens the crontab in a terminal, that that isn't actually opening in the 'vi' editor in that terminal? If it is vi, you should still be able to make your changes.
Donald Thaler
Super Advisor

Re: cron executable

you were right it's opening it in a vi window.. it used to open using the editor that comes with the common desktop environment.. when i look at the env variables i see that editor=vi, would you happen to know what that should be changed to, to invoke the cde editor ??
Steven Schweda
Honored Contributor

Re: cron executable

> you were right [...]

So was "man crontab".

> [...] i see that editor=vi, [...]

Do you mean "EDITOR=vi"? (Or do you have the
only case-insensitive UNIX system in
captivity?)

> [...] would you happen to know what that
> should be changed to, to invoke the cde
> editor ??

Know? No. Guess: dtpad.

man dtpad

If I wanted exotic command-line options, I'd
create a script in a convenient place, and
then specify "EDITOR=that_script". Expect it
to need to pass a command-line argument.
Alex Glennie
Honored Contributor

Re: cron executable

if dtpad fails .... try dtterm,xterm or hpterm
Patrick Wallek
Honored Contributor

Re: cron executable

>>try dtterm,xterm or hpterm

I'm not sure what that would accomplish, other than just opening a terminal window.

I tried setting EDITOR=xterm on a Linux system and it did not work well. It opened a new xterm window, but the crontab file did not show up in an editor, which is about what I would expect.

I set EDITOR=gedit and then did a 'crontab -e' and the gedit editor opened and functioned quite well with the crontab file.

I would expect dtpad to work. You may need to give the full path to dtpad if it doesn't work with just EDITOR=dtpad.
Alex Glennie
Honored Contributor

Re: cron executable

Donald ignore earlier post.

How or rather what are you running under exceed ? in otherwords are you logging into CDE, running a command via a terminal session or something else ?

within the terminal window type echo $TERM ?
result ?
export TERM=dtterm
try a crontab -e ?
result ?

If you can login via CDE let me know I'm more familar with that interface but have an old version of Exceed if needed if I boot into windows. currently uncertain if this is a bug or an issue with exceed/unix settings ....
Alex Glennie
Honored Contributor

Re: cron executable

Patrick,

Totally agree .... moment of madness
Donald Thaler
Super Advisor

Re: cron executable

dtterm worked... thanks to all...

i'm using exceed v10 with their secure shell v10 ...i'm guessing that in the command option that looks like "/usr/dt/bin/dtsession &", i need to add EXPORT=dtterm
Donald Thaler
Super Advisor

Re: cron executable

ooops it was dtpad that worked...

Steven Schweda
Honored Contributor

Re: cron executable

> [...] i need to add EXPORT=dtterm

> ooops it was dtpad that worked...

And it wasn't "EXPORT=", either. You (and
your readers) might profit if you explored
the benefits of using that newfangled
copy+paste technology. As the eminent
Abraham Van Helsing once said, "[...]
knowledge is stronger than memory, and we
should not trust the weaker." Or as an
automotive expert on NPR once said, "If you
don't think too good, don't think too much."