JOB SCHEDULING
In Aix Os we can
schedule jobs using crontab command; these jobs are executed in background at
mentioned time.
Suppose Administrator
want to create five users on next week, but next week system administrator is
out of country, that time admin can schedule this user creation job one week
before using crontab command, so that server
will create 5 users at scheduled time.
In this scheduling we can do following things.
- List scheduling
- Edit scheduling
- Clear scheduling
- Assign user permissions
1. List scheduling
Using crontab command we can list scheduled job.
#crontab –l
The above command is list the scheduled jobs
2. Edit scheduling
Using crontab command we can edit the scheduled job
#crontab –e
Here you have to mention i.e. at what jobs will be executed.
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
#run at 2:15pm on
the first of 6th month Saturday (comments)
15 14 1 6 6 #mkuser kumar
Kumar user will be created on mentioned time
NOTE:
Once crontab jobs completed, that output logs stored in /var/spool/cron/crontabs
3. Clear the scheduling
Using crontab command we can clear the scheduled jobs.
#crontab –r
After command execution this crontab file entries will be removed.
4. Assign the user permissions
We can allow and deny crontab usage permissions for users
Suppose u want to deny kumar user for crontab process, that time you put entry in /var/adm/cron/cron.allow file
Suppose u want to allow kumar user for crontab process, that time you put entry in
/var/adm/cron/cron.deny file
Like this we can assign permissions to users for crontab process
NOTE: In AIX OS at command also available for schedule the job, in this at command we cannot specify the multiple jobs, at a time we can run single job only, now a days this at command is not using by users, they are using only crontab