Link to home
Start Free TrialLog in
Avatar of boofulls
boofulls

asked on

cron job

im using a sun server and
someone did a cron job that
puts all the info on the server
onto a tape at 11pm every night
when i come in in the mornings
i get a cron output file in my
/tmp dir
would anyone know if this is ok?
i remove the file every morning...is it ok to do that?
would anyone know where the cron file is so that i can edit it to
remove this file in /tmp?

thanks
Avatar of chintu
chintu

who owns the file.

File should be created by the user that runs the
cron job.

You can typically see the cron jobs using the command  "crontab -l <username>"
you can edit the cron jobs using crontab -e  comand.

Cron jobs are stored in the spool at

/var/spool/cron/crontab
file names are same as login ids.

ASKER CERTIFIED SOLUTION
Avatar of Randyb
Randyb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of boofulls

ASKER

is still get an error every morning saying that
i should remove files from tmp when tmp is almost empty....

it says it cant spawn a new process as tmp is full and it needs more swap space

How did you modify your cron file ?
and which user were you, and did you look at the rest of the files in the crontab directory ?
Cut and paste the file here so we can see it. You most likely havent edited it correctly or missed another file that has nightly jobs scheduled.
Cron is a little tricky at first but once your used to it then you should have no trouble.

ALSO ... do you schedule nightly backups/archives manually ?? if so this may be where the dump is coming from.
How did you modify your cron file ?
using the editor "vi"
                         and which user were you, and did you look at the rest of the files in the crontab directory ?
root, i just modified the root file....and here it is
#ident  "@(#)root       1.19    98/07/06 SMI"   /* SVr4.0 1.1.3.1       */
#
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0   /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
55 11 * * 1,2,3,4,5  /usr/bin/backup
56 11 * * 1,2,3,4,5  /usr/bin/backup2

also the atpe device seems to be accessed every few minutes....
i hear a clicking sound....
is this due to the cron job?
thanks

Well it's the last two lines that have me curious, backup and backup2.

These are custom scripts I would imagine that backup your system. Now you either have a VERY small system or you need to space these out some as they one starts only one minute after the other. can you look at those two files and if they are small (a few lines) then paste them here.

Most likely all that has to be done is to add > /dev/null 2>&1 to the end of these two lines in the cron file but I want to look first. What I think is happening is that the output list of your backups is being dumped to /tmp (not the backup itself but the output list) this is a very common mistake.

Also ...what Database do you use ??? If your tape is being hit consistently you may be sending logical logs to it...something you need to be very aware of !
PS ...wanted to add a comment regarding the post from chintu above. Yes you were correct that /var/spool/cron/crontabs is the location of the cronfiles. It is also dynamically linked to /usr/spool/cron/crontabs ...both end up in the same place. It's just that /usr/spool is a more global directory and seems to be used by more unix vendors ... varies by system I am sure...but I wanted to clarify and offer credit for that !
sorry for the confusion
i didnt reschedule the cron job
thanks