LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 07: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, 07: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, 07: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, 08: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, 06:24 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
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


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


All times are GMT -5. The time now is 09:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration