run-parts runs all scripts, etc, in a directory. It's only argument is the
path of a directory.
In short, you're misusing it :)
On Fri, 8 Dec 2000, gary wrote:
> Dear all,
>
> Anyone can help, I've created a crons job to do backup as scheduled, but always
>failed to run, but I can run the backup command as "/etc/bkupjob/backup"
>
> I created crons job as below, using crontab -e
>
>
>--------------------------------------------------------------------------------------------------------------
> SHELL=/bin/bash
> PATH=/bin/bash:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/etp
>
> # m h dom mon dow user command
> 44 5 * * * root run-parts /etc/cron.daily
>
> 07 5 * * 7 root run-parts /etc/cron.weekly
>
> 00 5 1 * * root run-parts /etc/cron.monthly
>
> 00 3 * * 1-5 root run-parts /etc/bkupjob/backup
>
>--------------------------------------------------------------------------------------------------------------
>
> The cron.daily, cron.weekly and cron.monthly are default once, I only add the last
>line for backup purpose and my backup details as below
>
> ------------------------------------------------------------------------------
> #!/bin/bash
> #
> # Backup job for home and etc
> cd /
> tar cvbf 20 /dev/st0 ./home > /etc/bkupjob/bkhome.log
> tar cvbf 20 /dev/st0 ./etc > /etc/bkupjob/bketc.log
> ------------------------------------------------------------------------------
>
> When check the root's mail, it will show me the following error
>
> ------------------------------------------------------------------------------
> Date: Thu, 7 Dec 2000 11:01:00 +0800
> From: Cron Daemon <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Cron <root@thongsiek> root run-parts /etc/bkupjob/backup
>
> /bin/bash: root: command not found
> ------------------------------------------------------------------------------
>
> I did the same thing on my test server (same os and setting) it work fine..
> Please advise.... as it can't work, I need to do it manually. ;-x... and it is not
>the right way too..
>
> Thanks in advance...
>
> rdgs,gary
>
>
--
-Statux
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list