LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-27-2006, 06:01 AM   #1
user52
Member
 
Registered: Nov 2006
Posts: 41

Rep: Reputation: 15
difference between


hello all

what is difference between "CRON" or "CRONTAB".

plz. reply...

thanx
Taj
 
Old 11-27-2006, 06:15 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
When I say "Cron", I would be refering to the daemon. There are many cron daemons: vixie-cron, dcron, fcron.

The crontab is what you edit to add jobs that your cron daemon would execute.
 
Old 11-27-2006, 06:32 AM   #3
user52
Member
 
Registered: Nov 2006
Posts: 41

Original Poster
Rep: Reputation: 15
hello sir

sir i have another question...
i am using oracle database and linux operating system. right now i have to take bkp on linux. ( i am good on windows but not on linux so i want ur help)

i have one cmd from Oracle like

exp orion/orion owner=orion file=bkp.dmp log=bkp.log

sir i want to above cmd schedule on daily basis. through crontab utilities.

so first i create shell script
if yes
sir how can plz. can you give me example.

and then after i will use crontab to run .sh script.

again how can use cron tab
so i need to connect as root user or can i used normal user..


sir plz. reply

taj
 
Old 11-27-2006, 07:14 AM   #4
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
A standard bash shell script will look like this:

Code:
!/bin/bash

command to execute
I've never used oracle, but if the command you specified in your post works from your linux command prompt, than all you need is the !/bin/bash line followed by your command.

Once you've done that, there are many ways of editting the different cron daemons scheduled tasks. most people seem to prefer the crontab -e method.
 
Old 11-27-2006, 05:24 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, it's

#!/bin/bash

note the preceding '#', and it must be the first line in the script file.
As a rule, cron (the daemon prog) has a a very restricted list of programs it can see by default (ie the $PATH environment variable), so always specify the full path to any programs you want to run in the cron environment.
Try this tutorial: http://www.linuxforums.org/forum/lin...scheduler.html
 
  


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
What's the difference? Coldmiser SUSE / openSUSE 1 02-08-2005 01:25 PM
Difference? the mac 13 Linux - Software 7 01-13-2005 04:38 PM
difference between c and c++ nimra Programming 16 05-28-2004 01:55 AM
Is there a difference? enk0d General 2 11-08-2003 09:43 PM
What is the difference? pearsonx4 Linux - Newbie 4 10-05-2003 10:34 PM

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

All times are GMT -5. The time now is 09:23 PM.

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