LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 07-08-2005, 12:33 AM   #1
varunbihani
Member
 
Registered: Jul 2003
Location: indore, india
Posts: 69

Rep: Reputation: 15
run shell script on cron


Where can I learn writing shell scripts? I want to run a shell script via Cron daily...
plz help
 
Old 07-08-2005, 01:09 AM   #2
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
Re: run shell script on cron

Quote:
Originally posted by varunbihani
Where can I learn writing shell scripts? I want to run a shell script via Cron daily...
plz help


in your command line give

crontab -e

insert this line,this will run every night 09.30 PM

30 21 * * * /home/username/www/scriptname

check the execute permissions of script


To know more about shell scripting refer following links
http://www.freeos.com/guides/lsst/
http://www.tldp.org/LDP/abs/html/
 
Old 07-08-2005, 01:10 AM   #3
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 47
Good Scripting info:
http://linuxreviews.org/beginner/Bas...tion-HOWTO/en/

Some additional good Cron stuff:
http://linuxweblog.com/node/24

KC
 
Old 07-08-2005, 01:15 AM   #4
ahh
Member
 
Registered: May 2004
Location: UK
Distribution: Gentoo
Posts: 293

Rep: Reputation: 31
http://www.freeos.com/guides/lsst/
 
Old 07-08-2005, 01:33 AM   #5
varunbihani
Member
 
Registered: Jul 2003
Location: indore, india
Posts: 69

Original Poster
Rep: Reputation: 15
How can I run a shell comman daily at particular time with cron??
Do I need to write a shell script for that command and run that shell script on cron??
Plz help
 
Old 07-08-2005, 01:50 AM   #6
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
That i said already, put your cron entry in your crontab , look my above post, and change the time according to u
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
FTP Script will not run from Cron grhansen Programming 12 01-13-2006 04:13 AM
can't get cron to run my script. dr_zayus69 Linux - Software 6 04-12-2005 06:34 PM
can echo be used for popups in shell scripts run by cron? dr_zayus69 Linux - Software 4 04-12-2005 06:30 PM
shell script fo run auto job in cron JolynnMarie LinuxQuestions.org Member Intro 0 04-28-2004 11:21 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration