Procedure 3.5. Running periodic tasks with cronjobs
crontab
file for your Software Collection in the /etc/cron.d/
directory with the Software Collection's name.
%{?scl_prefix}crontab
crontab
file follow the standard crontab
file format, as in the following example:
0 1 * * Sun root scl enable software_collection '/opt/provider/software_collection/root/usr/bin/cron_job_name
'
/opt/provider/software_collection/root/usr/bin/cron_job_name
is the command you want to periodically run.
SOURCE2: %{?scl_prefix}crontab
/etc/cron.d/
by adjusting the %install
section of the Software Collection package's spec file:
%install install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/cron.d/