LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-29-2006, 02:13 AM   #1
user52
Member
 
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 linux...so plz. help
 
Old 11-29-2006, 03:21 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Crontab is used like
Code:
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, 03:48 AM   #3
meniscus
Member
 
Registered: May 2006
Posts: 70

Rep: Reputation: 15
Im using ubuntu

Is it bad practice to edit crontab with

Code:
sudo gedit crontab
command?
 
Old 11-29-2006, 06:53 AM   #4
blueCow
Member
 
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.
 
  


Reply



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 07:49 AM
cron tab, what do you use it for? Fritz_Monroe Linux - Newbie 12 09-28-2006 02:54 PM
Help me... Linux Server.. With Plesk.. Cron Tab 00tbone00 Linux - General 1 07-15-2006 01:16 AM
cron tab thefedexguy SUSE / openSUSE 4 07-06-2006 11:03 AM
creating a cron(tab) scheduled thing student04 Linux - Software 5 12-26-2004 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:06 AM.

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