Re: crontab won't run script with absolute path

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

 



Hi,

I presume root is running the cronjob ? Try and put the following on top of
the script:

#!/bin/bash --login


On 5/3/06 11:22 AM, "Cameron Beattie" <kjcsb@xxxxxxxxxxxx> wrote:

> I am experiencing a strange problem where crontab won't run a script when I
> specify the full path to it.
> 
> whereis logrotate
> logrotate: /usr/sbin/logrotate /etc/logrotate.conf /etc/logrotate.d
> /usr/share/man/man8/logrotate.8.gz
> 
> crontab -l
> 02 21 * * * logrotate /usr/share/mysql/mysql-log-rotate
> 
> In this case the crontab doesn't run because of a path issue.
> X-Cron-Env: <SHELL=/bin/sh>
> X-Cron-Env: <HOME=/root>
> X-Cron-Env: <PATH=/usr/bin:/bin>
> X-Cron-Env: <LOGNAME=root>
> X-Cron-Env: <USER=root>
> 
> /bin/sh: logrotate: command not found
> 
> crontab -l
> 02 21 * * * /usr/sbin/logrotate /usr/share/mysql/mysql-log-rotate
> 
> In this case the script is not run at all. No errors are reported in the
> logfile.
> 
> I'm sure there's an easy fix for this other than a symlink to
> /usr/sbin/logrotate?
> 
> Any advice appreciated.
> 
> Regards
> 
> Cameron 

Met vriendelijke groeten / Kind regards,

Eric
-- 
Eric Donkersloot
Amsterdam, The Netherlands
eric.donkersloot@xxxxxxxxx


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux