Welcome to the most active Linux Forum on the web.
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 01-07-2007, 10:30 AM   #1
Registered: Mar 2006
Location: Canada
Distribution: Suse 10.0 Retail, 10.1, 10.2, 11.1, Edubuntu 7.04, Mandriva 2010
Posts: 89

Rep: Reputation: 15
How To Create A Cron Tab/Task?


I was looking to automate a backup script that I have made. I want to have Cron run it for me. I understand that there should be a user tab in /var/spool/cron/tabs. However, when I went there there was no tab for me there. I then created my own tab and put my script in the newly created tab. Will this work, or am I missing a step that is required?

I am running Suse 10.0 with KDE 3.5. Any help offered is greatly appreciated.

Old 01-07-2007, 10:37 AM   #2
Registered: Sep 2006
Location: Silesia
Distribution: Debian GNU/Linux 4.0, ArchLinux, OpenBSD
Posts: 190
Blog Entries: 2

Rep: Reputation: 31
Personally I'm always using
crontab -e
. It runs an editor in which I can set the task and how often to run it. I think this is the best way.

Last edited by avallach; 01-07-2007 at 10:45 AM.
Old 01-07-2007, 10:38 AM   #3
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
You have to manage your crontab with the command
crontab -e
this open a vi session which let you create your own crontab. See man crontab for more details and other useful options. The environment variable EDITOR control the program used for editing (vi as default).
Old 01-07-2007, 10:39 AM   #4
Registered: Dec 2006
Location: Germany
Distribution: Kubuntu (Feisty Fawn), Debian (SID)
Posts: 127

Rep: Reputation: 15
You don't need to mess around in /var/spool for that.
Either you type crontab -e in a terminal which launches an available text editor (your favourite text editor as defined in the EDITOR shell variable, or when you're unlucky: vi ;-)
however, the crontab is in a special format, that means the time and date when a specific task is run must to be put in there in a special order:
1st column: minute of the hour
2nd column: hour of the day
3rd column: day of month
4th column: month
5th column: day of week
and finally 6th column: the command you want to run.

it is very flexible, but also not easy to grasp on first sight. for example, you can also define "slices" of time. If the first column is for example 59/3 then the command would be launched every 3 minutes.
Just have a look at the manpage.

KDE also has a frontend available, it is called kcron
Old 01-07-2007, 02:36 PM   #5
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
argh. Deleted. Just repeating other posters.


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
Alt-tab Task switch replacements, know of any? nova_ Linux - Software 1 12-03-2006 02:17 AM
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
cron tab thefedexguy SUSE / openSUSE 4 07-06-2006 12:03 PM
[cron][mdk9.1]cron deamon seems to ignore some task... yannrichet Linux - Newbie 5 06-26-2003 10:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:40 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