corntab is most used to schedule the jobs in AIX;
To view the list of jobs currently scheduled:
# corntab –l
To create now job scheduling:
# corntab –e (It will open vi editor and after making changes save and quit)
For example: September 21 12:30 AM represents 30:00:21:09:*
#corntab -e
30:00:21:09 touch /root/abc.txt
#corntab -e
30:00:21:09 touch /root/abc.txt
Minutes(0-59): Hours(0-23): Date(1-31): Month(1-12): Weak Day(0-6)
Corntab attributes can be stored in /var/adm/corn file, and log will store at /var/adm/corn/log
As a root user can also run corntab
# su - root
You can also schedule a job for the user # corntab -eu
to view the jobs of particular user # corntab -lu
To remove all the scheduled jobs # corntab -r
To remove all the scheduled jobs of particular user # corntab -ru
To check all the users of corntab # cat /var/adm/corn/corntab/
As a root user can also run corntab
# su - root
You can also schedule a job for the user # corntab -eu
to view the jobs of particular user # corntab -lu
To remove all the scheduled jobs # corntab -r
To remove all the scheduled jobs of particular user # corntab -ru
To check all the users of corntab # cat /var/adm/corn/corntab/
At command also used to schedule the job, but it executed once only
To view all the job scheduled with at command:
# at –l
To create job schedule with at command:
# at 11:11 today
# at 10:30
touch /root/abc.txt
touch /root/abc.txt
You can also deny or allow the corn and at commands using with edit the following files;
#cd /var/adm.corn
This command output will list default files corn.deny and corn.allow
# vi corn.deny
#vi corn.allow
#cd /var/adm.corn
This command output will list default files corn.deny and corn.allow
# vi corn.deny
#vi corn.allow
/var/adm/corn/corn.allow
/var/adm/corn/corn.deny
/var/adm/corn/at.allow
/var/adm/corn/at.deny
No comments:
Post a Comment