何でかなーと思ってman cronしてたらこういう記述を見つけた

  As described above, the files under these directories have to be pass some sanity checks including the following: be executable, be owned by root, not be writable by group or other and, if symlinks, point to files owned by root. Additionally, the file names must conform to the filename requirements of run-parts: they must be entirely made up of letters, digits and can only contain the special signs underscores ('_') and hyphens ('-'). Any file that does not conform to these requirements will not be executed by run-parts. For example, any file containing dots will be ignored. This is done to prevent cron from running any of the files that are left by the Debian package management system when handling files in /etc/cron.d/ as configuration files (i.e. files ending in .dpkg-dist, .dpkg-orig, and .dpkg-new).


  • 置くファイルは、実行権限あり + root所有 + groupとotherは書き込み権限なし
  • symlinkにした時は、先のファイルがroot所有
  • ファイル名にはletters, digits, -, _しか使えない
    • つまり.が入ってるとだめ
    • For example, any file containing dots will be ignored.

ということっぽい。もちろんcronの実装によるという話になるだろうけど、今回はdebianのVixie Cronでman cronしてた。


 あと関係ないけど underscores ('_') and hyphens ('-') がかわいい感じだった。