Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-29-2006, 03:13 AM   #1
Registered: Nov 2006
Posts: 41

Rep: Reputation: 15
cron tab

sir how to use cron tab utility ....

is there any precaution...

and any user use crontab utility

sir i am newbie for plz. help
Old 11-29-2006, 04:21 AM   #2
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Crontab is used like
crontab -e
which launches a text editor (usually vi) that you use to edit the crontab file (it's not edited directly). Saving an empty file won't make any difference. Writing some garbage shouldn't kill anybody, those lines just aren't run (or if the time settings are ok but the command is garbage, it probably just produces an error). Each user has it's own crontab file, which is (afaik) run as that user, so if you need to do something system-wide, run crontab -e as root.

I don't think you can mess anything really up with cron, except if you issued a bad remove command, so test the commands first out

Any user can use crontab, but they can't run anything they can't regularly run. Cron simply runs the given command(s) at the given time, as the user who created the crontab (root can create other user's crontab files too).

And if you happened to mess the crontab file up, just remove it (with crontab command!) and you're ok.
Old 11-29-2006, 04:48 AM   #3
Registered: May 2006
Posts: 70

Rep: Reputation: 15
Im using ubuntu

Is it bad practice to edit crontab with

sudo gedit crontab
Old 11-29-2006, 07:53 AM   #4
Registered: Feb 2004
Location: Florida
Distribution: FreeBSD, CentOS, Debian, Mint
Posts: 111

Rep: Reputation: 17
Yes and no. If you use gedit or any other editor to directly edit the crontab file, it will not do its error checking before closing the file. A better option would be to run `sudo crontab -u root -e` and edit it that way (If you are trying to create root cronjobs ofcourse, otherwise just ). If you like using gedit to edit your files just change the global $EDITOR variable to gedit.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
help in cron tab framedrelay Programming 1 11-15-2006 08:49 AM
cron tab, what do you use it for? Fritz_Monroe Linux - Newbie 12 09-28-2006 03:54 PM
Help me... Linux Server.. With Plesk.. Cron Tab 00tbone00 Linux - General 1 07-15-2006 02:16 AM
cron tab thefedexguy SUSE / openSUSE 4 07-06-2006 12:03 PM
creating a cron(tab) scheduled thing student04 Linux - Software 5 12-26-2004 10:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration