Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-21-2007, 08:29 AM   #1
LQ Newbie
Registered: Sep 2007
Posts: 1

Rep: Reputation: 0
How to run a shell script evey day automatically at a particular time

I have written a shell script(.sh file) which will automatically start the server of my application.
I want to run this script every day automatically at a certain time without the manual intervention.
How can i do it???????????

Can any one help please

Old 09-21-2007, 08:34 AM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You would use cron for that. Your distribution likely already has a directory called /etc/cron.daily, where you can place scripts that will run every day.

To edit the time the scripts are executed, run "crontab -e" as root to adjust the crontab file.
Old 09-22-2007, 12:53 PM   #3
Registered: Sep 2007
Posts: 42

Rep: Reputation: 15
you can also run cron jobs as any user. if you want your job to run with root permissions, then edit root's crontab. otherwise, login as whatever user (that has the necessary permissions for your job) and edit their crontab.

/etc holds the system cron files; slightly differnt than user's crontabs.

crontab -l will list the crontab for the current user.
see man crontab for other variations
Old 09-22-2007, 02:15 PM   #4
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
man is your best friend :o)

man cron <Enter>

Very useful information can be gathered by running man against any command you wish to explore.

You will find a nice tutorial on scripts here:

And very relevant cron information here:


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
Run shell script as root automatically elempoimen Linux - Software 8 06-20-2010 02:24 AM
Can't seem to run a simple shell script error command not found each time SimonT Linux - Newbie 5 10-29-2006 07:31 AM
shell script to make a program run for a certain time Valkyrie_of_valhalla Programming 4 08-01-2006 07:09 PM
RH8 - how to automatically run a shell script at boot time nu-B Linux - Newbie 2 11-03-2003 03:47 PM
RH8 - how to automatically run iptables rules shell script at boot time nu-B Linux - General 1 10-29-2003 09:38 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:25 PM.

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