IBM AIX-System Administration

Monday 29 October 2012

Job Scheduling /corntab, at


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
 
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> 

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

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>

/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

Disclaimer

Disclaimer : All trademarks or copy rights belongs to their original owners, I have collected the data from net and different books, All the information presented on this blog is provided on the basis of as is and is meant for reference purpose only without any expressed or implied warranty. Use of the information and its application in any form is sole discretion and responsibility of the user. adminaix.blogspot.com is not responsible for any damage or loss arising out of use of information presented here. This web site has links to external web sites and adminaix.blogspot.com is not responsible for the contents at those sites.

Comments

Contact Us

Name

Email *

Message *