Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Thursday, 7 November 2013

Job Scheduling /corntab, at in aix


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

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

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



/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