Re: Create log file from script code..
- From: Bit Twister <BitTwister@xxxxxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 15:22:49 -0600
On Thu, 30 Mar 2006 23:10:39 +0200, Geir Holmavatn wrote:
Hi,
Complete newbie here :-|
I have managed to create a few scripts which are started from crontab.
However I would like a verification that they actually have been executed.
How do I include in my bash script code to append a line like "MyScript was
run at <current date / time>" to the text file 'cronjobs.log' (and that
cronjobs.log is created if it doesn't exist)...
Sorry if this is too much to ask, but I learn a lot from examples
lots of code examples in /etc/init.d
echo "MyScript started $(date) " >> /tmp/cronjobs.log
For extra points, read
! bash script introduction documentation
http://tldp.org/LDP/intro-linux/html/index.html
! bash script advanced documentation
http://tldp.org/LDP/abs/html/index.html
.
- Follow-Ups:
- Re: Create log file from script code..
- From: Geir Holmavatn
- Re: Create log file from script code..
- From: Vilmos Soti
- Re: Create log file from script code..
- References:
- Create log file from script code..
- From: Geir Holmavatn
- Create log file from script code..
- Prev by Date: Create log file from script code..
- Next by Date: rpm install from rescue CD
- Previous by thread: Create log file from script code..
- Next by thread: Re: Create log file from script code..
- Index(es):
Relevant Pages
|