Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Cron Help, new to linux
G Man
post Jul 29 2005, 08:35 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 29-July 05
Member No.: 5,342



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
Go to the top of the page
 
+Quote Post
Corey
post Jul 31 2005, 02:28 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



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"


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th October 2017 - 04:42 AM