First, a brief background: I'm fairly comfortable with working from the command line, having done so for a while in Mac OS X, but I have recently been asked to assist with an AIX system.
There is currently a backup script that is set to run via Cron, and I would like to change the interval at which it runs. I know that normally this is done with Crontab, but the problem is that I don't know which tab file actually has the entry for this job, as a previous IT department set it up.
What I've found: /var/spool/cron/crontabs contains the usual files you'd expect, each named after the user that created them, but also some others: root_bad (which contains junk), root.tools.10417 (among other root.tools.othernumber files), etc. Only a few of the root.tools.* files have an entry referring to the backup script, but my understanding is that a Crontab file had to be named for a user. Is my thinking here correct, or is it possible that Cron is actually using these files?
The cron file would have to match a user in /etc/passwd to be processed The duff ones may even be generating errors in the cron log file if logging is switched on (default is /var/adm/cron/log on AIX). You will need to consider when it runs and try to find a suitable record in the files you have found. Remember that the format of a cron record is:
Code:
mi hh dd mn dw command
Where mi is minutes past the hour
and hh is the hour of the day
then dd mn defines day of month and month critera
which is or-ed with the Day of Week value.
With this last thing in mind, it is possible to do some very confusing things (as I know to my cost) where you think you have set a job to run on every first Monday of the month (Day of month 1-7, Month of * and Day of week 1) but what you get is every day from 1-7 AND every Monday.
You will need to trace what each active line does for each file with an associated user account. No easy way to do this I'm afraid. Perhaps switching cron to log may help, or rather removing the flag that stops it logging.
Hello,
The best way to modify the crontab is to use (editor like vi, but it will refresh the cron demon ): crontab -e
This will check the consistency of the date format.
crontab -l to list the content, or crontab -l <user>
All other files that don't belong to a user from /etc/password in the folder /var/spool/cron/crontabs can be delete, it's normally not the best place to store scripts.
Hello,
I was trying to run a script on a dev server using cron job. It supposed to run 3rd sunday of every month.
45 4 15-21 * 0 /home/user1/myscript.sh >/dev/null 2>&1 # run this script 3rd sunday of every month
When I Schedule it on AIX server, It is running every day at 4:45 AM.
am I... (3 Replies)
Hello gurus,
I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired
report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup
is shown below:
#!/bin/ksh
db2... (3 Replies)
Hi,
1)
If some job supposed to run on 1st of every month at 7 AM
In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day?
2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct)
And if 25th... (5 Replies)
Hi,
I have created a cron job on IBM AIX but it is not working in desired manner !
Here are the steps which I have followed :-
#!/bin/ksh
#------------------------------------------------------------------
find /some/file/at/the/user/side/test.log -exec cp {}... (8 Replies)
Hello,
I keep getting this message even after i removed it from the cron enteries it was added automatically
Broadcast message from root@oradb (tty) at 12:00:00 ...
rc.powerfail:2::WARNING!!! The system is now operating with a power problem. This message will be walled every 12... (2 Replies)
My searches turned up nothing relevant, so I apologize if this has already been looked at.
I am trying to run an expect script from a Solaris machine, that ssh's into an AIX machine, and interacts with a SMIT created menu system that runs a few backups for me.
The expect script runs fine when... (0 Replies)
Hello All,
Anybody please help me to know ,what happens when a user having entry in both cron.allow and cron.deny files.Wheather the user will be able to access the crontab???
Thanks in advance
Vaisakh (5 Replies)
Hi,
I can use 'crontabs –e' and do all the scheduling I like. However I would like to auto send myself just the cronjobs logs that fail. That is to say the PIDs that fail and the related lines with those PID’s only. (Not the full set of logs) Has anyone done this work? Or does an AIX 5.3 tool... (0 Replies)
I have problem with AIX v4.3.3 to run the cron job:
Please advise me on the above :
1 -) I need to run a backup for full system at 23:59, :
crontab -e
59 23 * * * /usr/bin/mksysb -i /dev/rmt0 > /dev/null 2>&1
2 -) I need to run a spesific command at 23:59:
crontab -e
59 23 * * *... (6 Replies)