Re: [CentOS] Script not running correctly as cronjob

2017-02-02 Thread Tony Mountifield
Best regards > Daniel > > > > -Original Message- > From: CentOS [mailto:centos-boun...@centos.org] On Behalf Of Tony Mountifield > Sent: Wednesday, February 1, 2017 11:04 AM > To: centos@centos.org > Subject: Re: [CentOS] Script not running correctly as c

Re: [CentOS] Script not running correctly as cronjob

2017-02-01 Thread Gordon Messmer
On 02/01/2017 01:02 AM, Daniel Reich wrote: I have a script to resign all DNS zones every two weeks. I don't think I can answer the question about why your script is failing per se, but I can say that there are some flaws in the approach that your script is taking. Primarily, if you delete

Re: [CentOS] Script not running correctly as cronjob

2017-02-01 Thread Daniel Reich
entos-boun...@centos.org] On Behalf Of Tony Mountifield Sent: Wednesday, February 1, 2017 11:04 AM To: centos@centos.org Subject: Re: [CentOS] Script not running correctly as cronjob In article <86827d81f1944333ae213f2d3f198...@2sic.com>, Daniel Reich <daniel.re...@2sic.com> wrote: >

Re: [CentOS] Script not running correctly as cronjob

2017-02-01 Thread David Both
Do not forget that cron does not use the root environment, such as $PATH. You need to set up the exect environment you need in the beginning of the crontab file. It would be helpful to see your crontab file to know what environment it has set up. Also the /var/log/cron log file should contain

Re: [CentOS] Script not running correctly as cronjob

2017-02-01 Thread Tony Mountifield
In article <86827d81f1944333ae213f2d3f198...@2sic.com>, Daniel Reich wrote: > Hi > > I have a script to resign all DNS zones every two weeks. When i run the > script from bash, it works like it should. But > when it is executed in cron not. Its starting normal as cronjob:

[CentOS] Script not running correctly as cronjob

2017-02-01 Thread Daniel Reich
Hi I have a script to resign all DNS zones every two weeks. When i run the script from bash, it works like it should. But when it is executed in cron not. Its starting normal as cronjob: Feb 1 03:00:01 xxx CROND[20116]: (root) CMD (sh /opt/dnssec/resign_dnssec_zones.sh) But after i get a