Forum Moderators: phranque

Message Too Old, No Replies

Cron Job Help

1and1hosting, cron job, linux server

         

Stay123

11:08 pm on Sep 10, 2007 (gmt 0)

10+ Year Member



So far I've managed to establish that curl works on my server. I've typed 'crontab -e' which gives me a page that looks a little like this:

CODE

~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/tmp/crontab.#*$!XsvUrq7" OL, OC

The cursor is at the top, and when I try to type in what the manual says I get a message at the bottom 'E348: No string under cursor'.

After randomly pressing various function keys it eventually allows me to type something, so I type in what I'm supposed to. But then I've no idea how I'm supposed to save it. There as far as I'm aware is currently no other cron jobs.

Can anyone tell me what I need to do?

I'm also using PuTTY by the way.

phranque

4:03 am on Sep 11, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you are editing in vi mode at this point.

here is the 10 second tutorial:
"i" puts you in insert mode.
"Esc" key escapes insert mode.
":wq" and "Enter" puts you in command mode and tells the editor to write (save the file) and quit.

need any more than that, try an online vi reference [docs.freebsd.org].

MichaelBluejay

9:17 am on Sep 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The problem is that when you type in "crontab -e", the system picks the default text editor, which on your sytem is "vi", which isn't for the faint of heart. I suggest using something like "pico", much friendlier.

The way to set your default editor depends on the flavor of Unix you're running. I think it's like this:

If you have a .bashrc file, add this to it:

VISUAL=pico; export VISUAL
EDITOR=pico; export EDITOR

Then type "source .bashrc" to reload.

If you have a .cshrc file instead, then add this to it:

setenv EDITOR /usr/bin/pico
setenv VISUAL /usr/bin/pico

If that doesn't work, repost here and someone better at Unix can help you.