The results may suprise you.
I made a little script and ran it as root user ( su - ) in my crontab.
First, I ran it every minute
* * * * * /home/test
This also ran every minute
*/1 * * * * /home/test
Then I ran it every ten minutes
*/10 * * * * /home/test
Then I put in the */100
*/100 * * * * /home/test
The first thing I noticed was this message...
# crontab -e
crontab: installing new crontab
You have new mail in /var/spool/mail/root
I checked the mail and it's not an error message,
but the fact that it sends an email when I used the bogus input
indicates that the crontab may be confused.
As this partial ls -al shows,
the new cron job now ran at every hour
I guess that the minutes field is ignored because it is invalid. That field needs to be a value between zero and 59 .
Code:
-rw-r--r-- 1 root root 3177714 Mar 25 10:30 1030.tar.gz
-rw-r--r-- 1 root root 3177714 Mar 25 10:40 1040.tar.gz
-rw-r--r-- 1 root root 3177714 Mar 25 11:00 1100.tar.gz
-rw-r--r-- 1 root root 3177714 Mar 25 12:00 1200.tar.gz
Code:
#!/bin/bash
filename=`date '+%H%M'`
cd /home/images
/bin/tar -cvzf /home/${filename}.tar.gz .