- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: What is wrong? -crontab-
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:29 AM
06-16-2003 12:29 AM
What is wrong? -crontab-
and I saved as ':wq!'.
but as soon as I did above command, the following error messages is displayed.
"Crontab: can't create crontab file in the crontab directory"
So, I restarted a cron daemon.
/sbin/init.d/cron stop/start.
and I edited crontab file directly in /var/spool/cron/crontabs/root.
But crontab is not executed yet.
Help me~~
Thank you for your kindness in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:31 AM
06-16-2003 12:31 AM
Re: What is wrong? -crontab-
if you edit the crontab file directly it is not used, because it is not read.
You shuold stop and start again cron to let it re-read the file.
As for the error, check the permission of the directory.
Did you start cron as root ?
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:32 AM
06-16-2003 12:32 AM
Re: What is wrong? -crontab-
If you edited the file /var/spool/cron/crontans manually then you need to start/stop the cron daemons.
regards
mB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:35 AM
06-16-2003 12:35 AM
Re: What is wrong? -crontab-
check permissions on the crontab directory
/var/spool/cron/crontabs
and permissions on executable
>ll /usr/bin/crontab
-r-sr-xr-x 1 root bin 24576 Nov 14 2000 /usr/bin/crontab
>
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:35 AM
06-16-2003 12:35 AM
Re: What is wrong? -crontab-
e.g
#crontab root (to submit root cron jobs)
From which user are you trying to edit crontab ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:39 AM
06-16-2003 12:39 AM
Re: What is wrong? -crontab-
permission of my dirs:
cbassi@omih471:/var/spool>ll cron
total 10
dr-xr-xr-x 7 bin bin 1024 Mar 6 15:24 .
dr-xr-xr-x 12 bin bin 1024 Mar 26 2002 ..
dr-x------ 2 root sys 96 Mar 6 15:24 .ataids
dr-x------ 2 root sys 96 Mar 6 15:24 .cronaids
dr-xr-xr-x 2 bin bin 96 Nov 15 2000 atjobs
-r--r--r-- 1 bin bin 335 Nov 14 2000 crontab.root
dr-xr-xr-x 2 bin bin 96 Apr 15 10:19 crontabs
drwxrwxrwt 2 root root 2048 Jun 16 10:37 tmp
and then:
cbassi@omih471:/var/spool/cron/crontabs>ll
total 10
dr-xr-xr-x 2 bin bin 96 Apr 15 10:19 .
dr-xr-xr-x 7 bin bin 1024 Mar 6 15:24 ..
-r-------- 1 root dba 2537 Apr 15 10:19 oracle
-r-------- 1 root sys 631 Mar 6 15:11 root
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:50 AM
06-16-2003 12:50 AM
Re: What is wrong? -crontab-
??? 8 ???????????????.
drwxr-xr-x 5 bin bin 96 2001.12.04 .
dr-xr-xr-x 14 bin bin 2048 2002.01.28 ..
dr-xr-xr-x 2 bin bin 96 2001.12.04 atjobs
-r--r--r-- 1 bin bin 342 1997.11.07 crontab.root
drwxr-xr-x 2 bin bin 96 6??? 16??? 17:13 crontabs
drwxrwxrwt 2 root root 96 6??? 16??? 17:38 tmp
UX17209:/]ls -al /var/spool/cron/crontabs
??? 4 ???????????????.
drwxr-xr-x 2 bin bin 96 6??? 16??? 17:13 .
drwxr-xr-x 5 bin bin 96 2001.12.04 ..
-r-------- 1 root sys 567 6??? 16??? 17:31 root
UX17209:/]ls -al /var/spool
??? 24 ???????????????.
dr-xr-xr-x 14 bin bin 2048 2002.01.28 .
dr-xr-xr-x 21 bin bin 2048 2001.12.06 ..
drwxrwsrwt 2 daemon daemon 96 5??? 27??? 11:15 calendar
drwxr-xr-x 5 bin bin 96 2001.12.04 cron
UX17209:/]crontab -e
* * * * * test
"/var/tmp/aaaa12896" 7 ???, 567 ???
crontab: can't create crontab file in the crontab directory
UX17209:/]id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
Help me~~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 12:58 AM
06-16-2003 12:58 AM
Re: What is wrong? -crontab-
strings /var/spool/cron/crontabs/root
# Review to see if it is readable
strings /var/spool/cron/crontabs/root >/tmp/rootscron
rm /var/spool/cron/crontabs/root
crontab /tmp/rootscron
Also, did you check the permissions on /usr/bin/cron executable?
Share and Enjoy! ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:05 AM
06-16-2003 01:05 AM
Re: What is wrong? -crontab-
if you execute this command:
ls -l /usr/bin/crontab
-r-sr-xr-x 1 root bin 32768 Feb 9 2001 /usr/bin/crontab
do you then see the "s" in the permissions on your system?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:06 AM
06-16-2003 01:06 AM
Re: What is wrong? -crontab-
try,
echo "* * * * * test" > cronfile.root
crontab cronfile.root
crontab -l
and check for root in /usr/lib/cron/cron.allow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:07 AM
06-16-2003 01:07 AM
Re: What is wrong? -crontab-
from your name and chars on the screen, i think you come from est.
There might be a problem with the language HPUX thinks it is using.
Have you another working server to check the following variable against?
- LANG
- LC_CTYPE
- LC_MESSAGES
Also:
a history of all actions taken by cron is recorded in
/var/adm/cron/log.
do you have any strange output ?
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:11 AM
06-16-2003 01:11 AM
Re: What is wrong? -crontab-
Was it working earlier ?
Please check
#more /usr/lib/cron/cron.allow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:17 AM
06-16-2003 01:17 AM
Re: What is wrong? -crontab-
-r-sr-xr-x 1 root bin 32768 Feb 9 2001 /usr/bin/crontab
UX17209:/]cat /usr/lib/cron/cron.allow
root
adm
uucp
UX17209:/]locale
LANG=C
LC_CTYPE="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=
UX17209:/]crontab -e
30 22 * * 1-5 su - ubs2 -c "/var/adm/cron_src/batch_proc4.sh" > /var/adm/cron_src/batch_proc4.log
00 01 * * * su - oracle -c "/var/adm/cron_src/dubs1exp.sh"
39 14 * * 0 su - oracle -c "/var/adm/cron_src/exp.sh"
30 19 * * 1-5 /var/adm/cron_src/ftp_cron_hp2.sh
~
~~
"/var/tmp/aaaa15855" 7 lines, 567 characters
crontab: can't create your crontab file in the crontab directory.
Help me~~~
Thank you for your kindness...
From Korea
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:24 AM
06-16-2003 01:24 AM
Re: What is wrong? -crontab-
drwxr-xr-x 15 root sys 1024 Apr 9 11:49 spool
dr-xr-xr-x 5 bin bin 1024 Apr 17 2002 cron
dr-xr-xr-x 2 bin bin 96 Jun 11 19:46 crontabs
Also check the permissions for /var/tmp
drwxrwxrwxt 3 bin bin 3072 Jun 16 14:51 /var/tmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:28 AM
06-16-2003 01:28 AM
Re: What is wrong? -crontab-
if all else fails, and there are no other good advice, the following is the latest cron patch:
PHCO_27141
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:29 AM
06-16-2003 01:29 AM
Re: What is wrong? -crontab-
total 56
drwxrwxrwx 5 bin bin 2048 Jun 16 18:25 .
dr-xr-xr-x 21 bin bin 2048 Dec 6 2001 ..
drwxrwxrwx 3 root sys 96 May 19 14:56 BAAa10957
-rw------- 1 ubs2 users 49152 Jun 16 18:07 Ex14851
drwxrwxrwx 2 root sys 96 Mar 12 11:05 ign_configure
drwxrwxrwx 2 bin bin 96 Dec 4 2001 ntp
I checked the permission of /var/tmp, /var/spool/cron, /var/spool/cron/crontabs...
What's wrong?
T T
Thanks many..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:30 AM
06-16-2003 01:30 AM
Re: What is wrong? -crontab-
My last weapon
#cat /var/adm/cron/queuedefs
Please give me the output
#man queuedefs for details
Thanks
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:32 AM
06-16-2003 01:32 AM
Re: What is wrong? -crontab-
I once had a similar problem 'cause vi couldn't create a temporary file ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 01:49 AM
06-16-2003 01:49 AM
Re: What is wrong? -crontab-
This is the method I would use for root
# crontab -l >/tmp/cron.out
# vi /tmp/cron.out (making your changes and then saving it)
# crontab /tmp/cron.out
and in case the cron process has a problem.
# ps -ef | grep cron | grep -v grep | awk '{print $2}' | xargs kill -5
# /usr/sbin/cron && echo cron started
then repeat the above editing method.
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 02:58 AM
06-16-2003 02:58 AM
Re: What is wrong? -crontab-
I did try to post this once, but apparently it was lost..
But you are not the first person facing this problem, e.g.:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xdb258f960573d611abdb0090277a778c,00.html
However, if I read your previous postings correctly, the solution suggested does not apply to your problem. But the last posting in the above mentioned thread leads me to suggest that you temporarily move the file root from the /var/spool/cron/crontabs directory elsewhere, e.g.:
# cd /var/spool/cron/crontabs
# mv ./root
And then try
# crontab -e
which should now create a new /var/spool/cront/crontabs/root file.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 07:39 PM
06-16-2003 07:39 PM
Re: What is wrong? -crontab-
a.4j1n
b.2j2n90w
I did as your advices.
But, I can't resolve the problem.
And I will continue to resolve the problem
till solving the problem.
Anyway, Thanks many^^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 07:50 PM
06-16-2003 07:50 PM
Re: What is wrong? -crontab-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 07:57 PM
06-16-2003 07:57 PM
Re: What is wrong? -crontab-
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.5/
And run /opt/tusc/bin/tusc crontab -e
You should be able to follow the output and find where in the process the permissions problem is surfacing. That would be a big clue in solving what is happening.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2003 08:16 PM
06-16-2003 08:16 PM
Re: What is wrong? -crontab-
Wow, I solved this problem.
I looked into crontab's man pages in detail.
I suspected environmental variable - PATH, SHELL, LOGNAME and so on -
So, I saw .profile of root user.
Oh my God, A few days ago, a unix programmer registered a environmental file for some program.
I commented above part.
and I executed 'crontab -e'.
I successed....
Anyway, Thanks many, forum-people^^
I always receive the help of this forum.
From Korea
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 07:50 AM
03-07-2006 07:50 AM
Re: What is wrong? -crontab-
check you environment variables
env |grep EDITOR
My EDITOR variable was set to emacs. I changed it to vi and everything worked fine.
Thanks