Skip to main content

UNIX - CRONTAB

                                                CRONTAB

  Crontab (CRON TABLE) is a file which contains the schedule of cron entries to be run and at specified times.

   INTERVAL INFO :

Character
Descriptor
Acceptable values
1
Minute
0 to 59, or * (no specific value)
2
Hour
0 to 23, or * for any value.
3
Day of the month
1 to 31, or * (no specific value)
4
Month
1 to 12, or * (no specific value)
5
Day of the week
0 to 7 (0 and 7 both represent Sunday), or * (no specific value)
                                                 
SYNTAX AND EXAMPLE

  • Existing examples:

§  If you wished to have a script named /root/backup.sh run every day at 3am, your crontab entry would look like as follows.
# crontab -e

Append the following entry:
0 3 * * * /root/backup.sh

TIP :

To delete GDE-WATHERS created by users , USERS can add this in their DEV

§  00 10 *  * * find /EME/dev/src/developers/${USER} /home/${USER} /var/stage/abinitio/data/dev/ -name 'GDE-WATCHER-*' -user ${USER} -mtime +1 | xargs -i rm -f {}
                                REFERENCE

§  CRONTAB is used in abadmq* users of hq1adwq01 server.


                                  AREA OF USAGE
§  Periodic cleanup
1.    GDEwatchers
2.    Recovery file
3.    Data file older than 90 days
4.    Moving files to backup

  • Periodic File check