- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron job
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
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
тАО11-16-2008 05:36 PM
тАО11-16-2008 05:36 PM
cron job
I have sheduled a cron job in HP server for system reboot. But it doest run last time.
Could you please help me to find out why it was not run.
Following is the cron entry.
01 14 * * 0 /etc/shutdown -ry 0
Sujith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 06:13 PM
тАО11-16-2008 06:13 PM
Re: cron job
what does you cron log shows..?
/var/adm/cron/log ..?
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 08:04 PM
тАО11-16-2008 08:04 PM
Re: cron job
You give the wrong path.
>>01 14 * * 0 /etc/shutdown -ry 0
/usr/sbin/shutdown -ry
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 08:09 PM
тАО11-16-2008 08:09 PM
Re: cron job
It seems ok..
$ ls -l /etc/shutdown
lrwxr-xr-t 1 root sys 18 Apr 22 2008 /etc/shutdown -> /usr/sbin/shutdown
$ ps -ef |grep -i cron
root 1596 1 0 Nov 9 ? 0:52 /usr/sbin/cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 08:12 PM
тАО11-16-2008 08:12 PM
Re: cron job
>>You give the wrong path.>>
nothing wrong in the path
see below my crontab "which i am shutdowing the server every -week end"
# crontab -l
15 08 * * * /opt/omni/lbin/check_back.sh
#00,5,10,15,20,25,30,35,40,45,50,55 21-23 * * * /var/adm/crash/perf/test.sh
0 9 * * 1-5 /home/ibmadm1/hc.sh 1>/dev/null 2>/dev/null
# Green IT - Server shutdown every Sunday 2000hrs
0 20 * * 0 /etc/shutdown -hy
# date
Mon Nov 17 12:09:22 SST 2008
# ll /etc/shutdown
lrwxr-xr-t 1 root sys 18 Jun 23 2005 /etc/shutdown -> /usr/sbin/shutdown
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 08:15 PM
тАО11-16-2008 08:15 PM
Re: cron job
did you manged to check on cron logs, what does its says
Thnx
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 08:27 PM
тАО11-16-2008 08:27 PM
Re: cron job
I have not found any entries at 14:01 ..
root 18856 c Sun Nov 16 14:00:00 CST 2008
< root 18856 c Sun Nov 16 14:00:00 CST 2008
> root 20394 c Sun Nov 16 14:05:00 CST 2008
< root 20394 c Sun Nov 16 14:05:00 CST 2008
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 08:34 PM
тАО11-16-2008 08:34 PM
Re: cron job
need check double confirm "root" added to cron.allow file
..?
also please check "syslog" for Sun Nov 16 14:00:00 CST 2008..?
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 09:04 PM
тАО11-16-2008 09:04 PM
Re: cron job
root
And There is no entries in syslog for this time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 09:23 PM
тАО11-16-2008 09:23 PM
Re: cron job
If only the cron.deny exist and is empty,all users can use crontab.file exists only the root user can use the crontab
if you till face some problem
restart the crontab
/sbin/init.d/cron stop
cd /usr/lib/cron
mv FIFO FIFO.old
/sbin/init.d/cron start
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 10:34 PM
тАО11-16-2008 10:34 PM
Re: cron job
The fifo file shows zero bytes.
Can you tell me wt is FIFO file.
prw------- 1 root root 0 Nov 14 21:24 FIFO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2008 10:40 PM
тАО11-16-2008 10:40 PM
Re: cron job
execute at the current time. If there are any child processes (jobs)
running, the FIFO read will be delayed.
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2008 01:25 AM
тАО11-17-2008 01:25 AM
Re: cron job
is it ok if we update the crontab using vi.
what difference does it make if we use vi and crontab -e to edit the crontab
i had a same situation where the cronjob did not run after i edited the crontab using vi
do i have to restart the cron??
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2008 01:51 AM
тАО11-17-2008 01:51 AM
Re: cron job
Sunny -> after you edited cron with vi you should restart cron.
Editing with crontab -e command doesn't require restart.
Regards,
Michal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2008 01:55 AM
тАО11-17-2008 01:55 AM
Re: cron job
>>i had a same situation where the cronjob did not run after i edited the crontab using vi >>
by editing crontab using " crontab -e " will helps to refresh crontabs by itself
(i mean you will getting message at the bottom when wq! some thing like Commands will excuted by root")
vi -> doesn't do that for you ,
hope you understand
Thx
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2008 02:21 AM
тАО11-17-2008 02:21 AM
Re: cron job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2008 06:02 AM
тАО11-17-2008 06:02 AM
Re: cron job
It is probably better to use the correct path than the tlink. They were planned to be removed for 11.31.
>mv FIFO FIFO.old
I've never needed to do this.
>Sunny: is it ok if we update the crontab using vi?
No, you should never do this directly. As Michal and Johnson said, only use crontab(1).