Did you know LQ has a Linux Hardware Compatibility List?
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 08-26-2005, 01:06 PM   #1
Registered: Oct 2003
Distribution: Mandrake 9
Posts: 46

Rep: Reputation: 15
Using crontab in a bash script

I have a bash script and would like to set a cron during the script execution. I have done research on 'crontab' and as far as I know, you can only edit the crontab file. Is there a command that I can use to insert a job into the crontab file?

Old 08-26-2005, 03:18 PM   #2
Registered: May 2005
Distribution: debian
Posts: 79

Rep: Reputation: 15
if you know what you want to insert into the crontab, have the bash script make a call like:

echo "30 18 * * * /path/to/script" > whatevercrontab.file
This will put

30 18 * * * /path/to/script
into your whatevercrontab.file
Old 08-26-2005, 07:06 PM   #3
Registered: Oct 2003
Distribution: Mandrake 9
Posts: 46

Original Poster
Rep: Reputation: 15
How do I locate what file I am using? All I know is crontab -e which will simply bring up the editor.

Old 08-26-2005, 08:04 PM   #4
Senior Member
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
what do you mean? locate the file....
whereis <file name>
slocate <filename>


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
Script having problem with Crontab DriveMeCrazy Programming 5 07-18-2005 03:29 PM
error running script on crontab haora Linux - Newbie 3 03-11-2005 04:02 PM
Script doesn't run in crontab dani81 Linux - General 1 11-16-2004 03:42 AM
crontab not finding script michaeln *BSD 4 08-22-2004 10:07 PM
bash script for database searching using crontab saurya_s Linux - Software 5 01-22-2004 08:53 AM

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