cron
Я всё удивлялся, почему на нубских линуксячьих форумах так много плача о неработающих cron задачах. Ведь такая простая система! Однако в последнее время сам много с ним воюю :-/
Переехал c dcron на cronie, и внезапно перестал срабатывать один скрипт из /etc/cron.hourly. Копаю, и оказывается, что run-parts выполняет (по-умолчанию) не все исполняемые файлы из /etc/cron.{hourly,daily,weekly}, имя должно удовлетворять условию. man run-parts:
If neither the --lsbsysinit option nor the --regex option is given then the names must consist entirely of ASCII upper- and lower-case letters, ASCII digits, ASCII underscores, and ASCII minus-hyphens.
If the --lsbsysinit option is given, then the names must not end in .dpkg-old or .dpkg-dist or .dpkg-new or .dpkg-tmp, and must belong to one or more of the following namespaces: the LANANA-assigned namespace (^[a-z0-9]+$); the LSB hierarchical and reserved namespaces (^_?([a-z0-9_.]+-)+[a-z0-9]+$); and the Debian cron script namespace (^[a-zA-Z0-9_-]+$).
А мой скрипт назывался JOB.sh >_<
Теперь хочу в кронтаб рута запилить задачу, которая должна регулярно создавать архив
job | xz > archive_`date +%F_%T`.xz
не работает. WTF?! Оказывается, дело в кавычках, $( xz ) работает. Вот эту проблему я вообще не понимаю.