usage: ./run-timed-parts [--all] [-v] Purpose: Run all scripts in the specified directory that match the current time Description: ./run-timed-parts runs any script in the specified directory that contains date-time data to match the current time. It must be invoked by a user's crontab entry. Placed in a user's cron.d/cron.(hourly | daily | weekly) directory, a script will be run when the date-time matches that specified in the "MONTH:" etc lines below. Output from scripts is appended to /cron.log run-timed-parts will look for the "run-timed-parts date info" line and then read the MONTH, DWEEK, DAY, HOUR, MINUTE lines. If a variable is missing, blank or contains the current month, day, hour... it is assumed the script is to be run. If any variable contains a value and this is _not_ the current month, day, hour, the script will be skipped. To run at more than one but not all minutes, use a comma separated list for the MINUTE entry. run-timed-parts will source the user's .bash_profile before running any scripts. If a script needs to run in a specific directory, it should be stored in that directory and symlinked from run-timed-parts's working directory Scripts are tested and run sequentially. If one script takes more than one minute to execute, the next script will not run since its date/time entry will no longer match current time. Options: --all Run all scripts listed for this time even if they run into the next minute. -v Be verbose example: # MINUTE: 10 # HOUR: 0 # DAY: 7 # DWEEK: 1 # MONTH: 5 will run at 00:10 on monday 7th may example: # MINUTE: 15 # HOUR: 20 # DAY: # DWEEK: 3 will run at 20:15 every wednesday example: # MINUTE: 35, 45, 55 # HOUR: # DAY: will run at 35, 45 and 55 minutes past each hour Note that, unlike cron, DAY and DWEEK must both match for the script to run. Author: Conor Daly Date: 10th October 2005 License: GPL The following lines must exist to enable a run-timed-parts script: # run-timed-parts date info # MONTH: # DWEEK: # DAY: 2 # HOUR: # MINUTE: 35