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
/etc/cron.daily runs quite long. You might need create your own directory with test files.
run-parts --test /etc/cron.daily
run-parts --list /etc/cron.daily
- Run the command
tail -f /var/log/cronin one terminal (as root). Then execute:
Scripts in your directory were executed.
--testoption will list all files which would be executed
--listoption will list all files, which are not filtered
- 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): starting tmpwatch Jan 4 08:39:47 hostname run-parts(/etc/cron.daily): finished tmpwatch