- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- what is wrong with this crontab entry ?
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
Discussions
Discussions
Forums
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
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
тАО02-07-2006 04:31 AM
тАО02-07-2006 04:31 AM
johnsonr@nmscrme03 > mail
From johnsonr Tue Feb 7 12:11:15 2006
Date: Tue, 7 Feb 2006 12:11:15 -0500 (EST)
From: johnsonr
Message-Id: <200602071711.k17HBF707885@nmscrme03.kp.org>
To: johnsonr
Subject: Your crontab file has an error in it
Content-Length: 1084
Your "crontab" on nmscrme03
unexpected end of line
This entry has been ignored.
? n
This is the crontab entry:
johnsonr@nmscrme01 > crontab -e
"/tmp/crontabn9a4o2" 11 lines, 757 characters
00 8 * * * /opt/home/johnsonr/cronstuff/NC-CentralCron.sh > /dev/null
30 8 * * * /opt/home/johnsonr/cronstuff/NC-DONCron.sh > /dev/null
00 9 * * * /opt/home/johnsonr/cronstuff/NC-EastBayCron.sh > /dev/null
30 9 * * * /opt/home/johnsonr/cronstuff/NC-GoldenGateCron.sh > /dev/null
00 10 * * * /opt/home/johnsonr/cronstuff/NC-NorthBayCron.sh > /dev/null
30 10 * * * /opt/home/johnsonr/cronstuff/NC-SacrementoCron.sh > /dev/null
00 11 * * * /opt/home/johnsonr/cronstuff/NC-SouthBayCron.sh > /dev/null
00 6 * * 0,3 /opt/CSCOpx/bin/crmimport.pl /opt/IMS/tmp/cw2k_db.add
#script to watch for the process that communicates with the remote syslog server
30 * * * * $HOME/scripts/pswatch.sh >> /tmp/out 2>&1
Solved! Go to Solution.
- Tags:
- crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:38 AM
тАО02-07-2006 04:38 AM
SolutionYou can use $HOME in cron...
Also, you might have garbage in it.....
do a crontab -l >z
then
od -Ad -tc -v z
Get rid of garbage, extr lines...
then
crontab z
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:40 AM
тАО02-07-2006 04:40 AM
Re: what is wrong with this crontab entry ?
My guess is that it's the script that has $HOME in the command line.
Remove this and put the absolute path.
Keep in mind that when cron runs, its environment is extremely "light", and doesn't know much about defaulted variables. In most cases, this lack of defined environment variables is the cause of the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:44 AM
тАО02-07-2006 04:44 AM
Re: what is wrong with this crontab entry ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:44 AM
тАО02-07-2006 04:44 AM
Re: what is wrong with this crontab entry ?
Rob,
You are better off using full path names instead of variables like $HOME - cron runs a limited shell and sometimes has problems with variables in command lines.
Also, have you tried remarking one line out at a time to see which one causes the error message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:45 AM
тАО02-07-2006 04:45 AM
Re: what is wrong with this crontab entry ?
It has almost no environment.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:46 AM
тАО02-07-2006 04:46 AM
Re: what is wrong with this crontab entry ?
You have too many fields:
30 * * * * $HOME/scripts/pswatch.sh
Remove one splat ("*").
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:47 AM
тАО02-07-2006 04:47 AM
Re: what is wrong with this crontab entry ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 08:20 PM
тАО02-07-2006 08:20 PM
Re: what is wrong with this crontab entry ?
I use $HOME in crontab from a lot of time (HP-UX11i) without any problem and the syntax:
30 * * * * $HOME/scripts/pswatch.sh >>/tmp/out 2>&1
it's ok.
Use:
crontab -l>crontabl.txt
strings crontabl.txt>crontabls.txt
diff crontabls.txt crontabl.txt
If ther are differencies means that at least one unprintable char in present in your crontab.
HTH,
Art
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 08:30 PM
тАО02-07-2006 08:30 PM
Re: what is wrong with this crontab entry ?
Remove this empty line.