From Fedora Project Wiki

Revision as of 02:24, 18 June 2011 by Athmane (talk | contribs) (Add pkg name -based category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

run-parts is able to run scripts in a directory. The command run-parts is most often used for cron.daily jobs.


How to test

As root try to execute run-parts with(out) options. Pay attention to directory, which you'll run. For example prelink in /etc/cron.daily runs quite long. You might need create your own directory with test files.

  1. Execute: run-parts --test /etc/cron.daily
  2. Execute: run-parts --list /etc/cron.daily
  3. Run the command tail -f /var/log/cron in one terminal (as root). Then execute: run-parts /etc/cron.daily

Expected Results

Scripts in your directory were executed.

  1. The --test option will list all files which would be executed
  2. The --list option will list all files, which are not filtered
  3. This can be verified by checking /var/log/cron, where are logged starting/finishing of jobs eg:
Jan  4 08:39:47 hostname run-parts(/etc/cron.daily)[3204]: starting tmpwatch

Jan  4 08:39:47 hostname run-parts(/etc/cron.daily)[6432]: finished tmpwatch