Re: Bug with cron ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

The following script works fine on all worksation when it's start manually or if I run it line by line manually.

If I would like to run it on crontab, the following line
	"/usr/bin/yum -y install VMware-Player-2.5.1-126130.x86_64" 
not install the new release of vmplayer with no errors.



#!/bin/bash

SHELL=/bin/bash
export SHELL

/etc/init.d/vmware  stop

/usr/bin/yum -y remove VMwarePlayer.x86_64
/usr/bin/yum -y remove VMware-Player.x86_64

/usr/bin/yum -y install VMware-Player-2.5.1-126130.x86_64

/usr/bin/vmware-networks --stop
/usr/bin/vmware-networks --migrate-network-settings /vmware/virtualmachine
/usr/bin/vmware-networks --start

/sbin/chkconfig --level 345 vmware on 
##############################################







-----Message d'origine-----
De : centos-bounces@xxxxxxxxxx [mailto:centos-bounces@xxxxxxxxxx] De la part de John Doe
Envoyé : vendredi 20 mars 2009 11:09
À : CentOS mailing list
Objet : Re:  Bug with cron ?


From: MOKRANI Rachid <Rachid.MOKRANI@xxxxxx>
> Something is strange on my system. I have a simple shell script to run
> on many computers . When I run this script by hand, everything works
> fine on all workstations.
> But if I start this script via crontab vmplayer is never install with no
> errors.
> #/usr/bin/yum -e 0 -d 0 -y remove VMware-Player.x86_64
> #/usr/bin/yum -e 0 -d 0 -y install VMware-Player-2.5.1-126130.x86_64
> #/usr/bin/vmware-networks --stop
> #/usr/bin/vmware-networks --migrate-network-settings
> /vmware/virtualmachine
> #/usr/bin/vmware-networks --start
> #/sbin/chkconfig --level 345 vmware on

When you say "I run this script by hand", do you mean run the script itself or each line of the script as you showed above?
Did you try to redirect stdout/stderr to files to see what is going on?

JD


      

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos
__________________________

Ce message (et toutes ses pièces jointes éventuelles) est confidentiel et établi à l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'IFP décline toute responsabilité au titre de ce message.

This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP should not be liable for this message.

Visitez notre site Web / Visit our web site : http://www.ifp.fr
__________________________

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux