Job Scheduling:
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:* <command>
#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) <command>
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 <username>
to view the jobs of particular user # corntab -lu <username>
To remove all the scheduled jobs # corntab -r
To remove all the scheduled jobs of particular user # corntab -ru <username>
To check all the users of corntab # cat /var/adm/corn/corntab/<username>
As a root user can also run corntab
# su - root
You can also schedule a job for the user # corntab -eu <username>
to view the jobs of particular user # corntab -lu <username>
To remove all the scheduled jobs # corntab -r
To remove all the scheduled jobs of particular user # corntab -ru <username>
To check all the users of corntab # cat /var/adm/corn/corntab/<username>
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 <command>
# 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
<username>
<username>
#vi corn.allow
<username>
<username>
#cd /var/adm.corn
This command output will list default files corn.deny and corn.allow
# vi corn.deny
<username>
<username>
#vi corn.allow
<username>
<username>
/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