Hi all,
First, I'd like to thank you all for the replies. Secondly, I must say sorry as I didn't mentioned it earlier that I was playing the script on a machine running Zentyal 2.0-3 (which is based on Ubuntu 10.04) on a test environment.
@Snark1994:
As for mail check, I did typed "mail" (if it's the right way to run "mail"), but Zentyal said:
The program 'mail' can be found in the following packages:
* heirloom-mailx
* mailutils
Try: apt-get install <selected package>
Well, I guess Zentyal don't use mail by default.
As for the crontab line, Ok, will change as per your suggestion. Just the number without the slash "/" will run the script every 30mins, right?
Anyway, as I mentioned it earlier I was just copy-pasting and then mixing the codes, so at that time I have no idea of what is the proper syntax.
However, your reply made me check the syntax, hopefully I'm looking at the right place:
http://crontab.org/
I found that the slash "/' notation is what they called "Step Values".
-- quote --
Step values can be used in conjunction with ranges. Following a range with ``/<number>'' specifies skips of the number's value through the range. For example, ``0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22'').
Steps are also permitted after an asterisk, so if you want to say ``every two hours'', just use ``*/2''.
-- end quote --
Does this makes */30 * * * * is the same with 30 * * * * ?
@tronayne:
Ah, I see. No wonder it does not work on cron. Ok, will give it a try an come back.