Operating System - Tru64 Unix
1829578 Members
5304 Online
109992 Solutions
New Discussion

set cron jobs on Tru 64 unix ver 5.1b

 
SOLVED
Go to solution

set cron jobs on Tru 64 unix ver 5.1b

Hello,
I set the cronjob on tru64 unix but its not working . I not able to find cron.allow file and nothing in cron.deny file. can anyone tell me how to set the job please....
I am running the batches manually and I able to do the same on HP-UX successfully.

Thanks,
Syed Moin
8 REPLIES 8
Victor Semaska_3
Esteemed Contributor

Re: set cron jobs on Tru 64 unix ver 5.1b

Syed,

By default the cron.allow file doesn't exist. The cron.deny files does but with no entries. This should allow any user to run cron jobs.

1) Is the cron daemon running? Check with 'ps -ef | grep cron'

2) Remember that when something that runs as a cron job the user's profile isn't executed so any changes to environment variables like PATH won't be there.

2) If your job generated output to stdout or stderr and you didn't direct that to a file it should have been mailed to your account. Did you check for mail?

2) Please post the entry you have in your crontab that's not working.

Vic


There are 10 kinds of people, one that understands binary and one that doesn't.
Victor Semaska_3
Esteemed Contributor

Re: set cron jobs on Tru 64 unix ver 5.1b

Syed,

Forgot to mention to check /var/adm/cron/log to see if the job tried to run.

Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
Johan Brusche
Honored Contributor

Re: set cron jobs on Tru 64 unix ver 5.1b


Use 'crontab -e' to create/modify jobs in your crontab. Do not use vi to change the crontabs in /var/spool/cron/....., the running cron deamon will not see the change then.
It's not clear what you mean with "set the jobs".

Rgds,

___ Johan ./

_JB_
Alexey Borchev
Regular Advisor

Re: set cron jobs on Tru 64 unix ver 5.1b

1) Be careful - do not
# cron
- because it will start second cron daemon in the system, which may introduce some very stange effects ;-)
2) Try to examine system events: sysman ->
monitoring & tuning -> view events -> then change filter do not hide low-priority events.
Cron job start are logged there too, maybe You'll see some errors.
The fire follows shedule...
Ivan Ferreira
Honored Contributor

Re: set cron jobs on Tru 64 unix ver 5.1b

What is the exact problem that are you having?

Also remember that cron does not use environment variables. Specify the full path to commands in cron jobs.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?

Re: set cron jobs on Tru 64 unix ver 5.1b

hi guys,
sorry for late update as i am on short leave

cron daemon is running by ps -ef|grep cron
root 828 1 0.0 Oct 17 ?? 0:00.78 /usr/sbin/cron
root 188788 186923 0.0 10:37:23 pts/5 0:00.00 grep cron

entries of crontab file - a relevant portion of crontab file
#crontab -l
# Run the script to perform maintenance on LSMSA log files
#
12 2 * * 0 test -x /usr/lib/java/applications/lsmsa/logMaintenance && /usr/lib/java/applications/lsmsa/logMaintenance 10 > /dev/null
#
# Run the script to execute sys_check for Insight Manager
#
#0 3 * * 0 /usr/share/sysman/bin/runsyscheck
00 20 29 * * /u01/syed/10g_update ------------ this is my script to run the batch , if run manually working fine.

no jobs run with this batch in log file
I enter the job in file /var/spool/cron/crontab/root file,
but when i check the path with 'pwd' it shows me as
# pwd
/var/cluster/members/member0/spool/cron/crontabs

please let me know the exact steps to run the job from the begining ,
I have 2 batch files which I have to run daily one in afternoon and another one in night.

Thanks,
Syed
Victor Semaska_3
Esteemed Contributor
Solution

Re: set cron jobs on Tru 64 unix ver 5.1b

Syed,

Did you edit /var/spool/cron/crontabs/root directly with vi? Is so, as Johan mentioned, that won't work even though you see it in the crontab file. You have to use 'crontab -e' to put the entry in root's crontab. Use this command and enter the entry again.

Your entry:
00 20 29 * * /u01/syed/10g_update
indicates it should run on the 29th of every month at 8 PM. Is that what you want?

Finally, the reason why you get /var/cluster/members/member0/spool/cron/crontabs with pwd is beacuse /var/spool/cron is a CDSL (Context Dependent Symbolic Link).

# ls -l /var/spool/cron
/var/spool/cron -> ../cluster/members/{memb}/spool/cron

In other words, it's normal.

Vic
There are 10 kinds of people, one that understands binary and one that doesn't.

Re: set cron jobs on Tru 64 unix ver 5.1b

Thanks to everybody who participate in this forum. it solved my problem by using crontab -e and after editing i able to see in root file as well.....

Problem solved thanks once again

Regards,
Syed Moin