
En Slackware es algo sumamente fácil, por defecto cuenta con las siguientes carpetas.
/etc/cron.daily/ /etc/cron.hourly//etc/cron.monthly/ /etc/cron.weekly/
En ellas podemos colocar scripts con instruciones que queremos que se ejecuten cada hora (cron.hourly), cada día (cron.daily), cada semana (cron.weekly) o cada mes (cron.monthly).
Si queremos saber mas detalles sobre a que horas se ejecuta un script abrimos el archivo de configuración de crontab con el siguiente comando.
$ crontab -e
Por ejemplo en mi caso tengo la siguiente configuración.
# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null. We'll do this here since these jobs should run
# properly on a newly installed system. If a script fails, run-parts will
# mail a notice to root.
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this. If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 15 minutes after the hour:
15 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
Donde podemos ver que los trabajos que se ejecutan cada hora (hourly) se inician en el minuto 15. Podemos modificar estos parametros o agregar un nuevo script o carpeta que por ejemplo se ejecute cada dos horas.
El comando "run-parts" ejecuta todos los scripts que se encuentran en una carpeta determinada.
Se me olvidaba un último dato y es que todos los scripts a ejecutar tienen que ser por supuesto ejecutables, esto lo logramos con el siguiente comando.
$ chmod a+x script