Help - Search - Members - Calendar
Full Version: Cron Help
Linuxhelp > Support > Technical Support
G Man
I'm learning Linux, and I'm trying to get the cron command working.

I want to make the simplest command, just to know I can make it work.

- I did crontab -e
- wrote this command line:
* * * * * echo hello

I'd expect it to write "hello" every minute in the prompt.

But instead I get mail every minute with all the cron info, and the hello message at the end.

I tried * * * * * root echo hello but it gave giving me an error message saying root command not found... without specifying the user it gives me no error messages.

But I'd want it to appear in the prompt every minute, or write to a txt file... but not in my mail.

What am I doing wrong?

thks in advance
Corey
Cron runs in the background, not your active console window. So, when you tell it to echo something, it's going to email it because it's a background process. If you want echo to write to a file, do something like this "echo "blah" >> /tmp/crontest"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.