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-04-2012, 07:07 PM   #1
Registered: Oct 2010
Posts: 57

Rep: Reputation: 0
cron *.sh file location

where does one normally keep their bash files for cron?
lets say i have this cron
* */2 *  *  * /path/to/ httpd /etc/httpd/conf.x/test.conf > /dev/null 2>&1
what would be a normal directory to place '' ?
Old 01-04-2012, 07:13 PM   #2
Senior Member
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210
Depending on your distro, you might already have cron.daily, cron.weekly directories in /etc. If so, you shouldn't need to edit crontab at all, and you can simply plop the script into one of those directories.

Otherwise, /etc/init.d/ or /usr/local/bin/ might be reasonable locations.
1 members found this post helpful.
Old 01-04-2012, 07:16 PM   #3
LQ Newbie
Registered: Jan 2012
Location: Ohio
Distribution: Debian, CentOS, Fedora, LFS
Posts: 24

Rep: Reputation: Disabled
It depends. For personal stuff I put them in ~/bin.

I've got some scripts I run as root that are in /root. I could also move them to /bin or /sbin or /usr/bin I suppose.

There is no standard location. Put them where you want, as long as you remember where they are. As long as you use the correct path in the crontab entry, it shouldn't matter.
1 members found this post helpful.


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
[SOLVED] gcc recompiles c file (obj file in different location) freeindy Programming 2 07-11-2011 03:45 AM
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron file 000-delay.cron (it is on my FC5) - what is the purpose? jtmoon Linux - Server 1 03-08-2007 11:15 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U SUSE / openSUSE 11 01-04-2007 01:57 AM > Forums > Linux Forums > Linux - Newbie

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