それマグで!

知識はカップより、マグでゆっくり頂きます。 takuya_1stのブログ

習慣に早くから配慮した者は、 おそらく人生の実りも大きい。

crontab で 複数行に渡る、cron ジョブを記述するには

こちらを参照

詳しい内容はこちらに書きました。

cron/crontab で 複数行の実行には波括弧 {} を使う - それマグで!

複数行のcrontab コマンドってかけないのかな

調べたけど、かけないことがわかった。

man によると

The ``sixth'' field (the rest of the line) specifies the command to be run.  The entire command portion of the line, up to a newline or % character, will
       be executed by /bin/sh or by the shell specified in the SHELL variable of the crontab file.  Percent-signs (%) in the command, unless escaped with  back‐
       slash  (\),  will  be  changed  into newline characters, and all data after the first % will be sent to the command as standard input. There is no way to
       split a single command line onto multiple lines, like the shell's trailing "\".

記号 % は改行として、sh に渡されるが、バックスラッシュを渡すようなものはない。って書いてありました。

残念。

ぐぐったら minix のcrontab は出来るっぽいけど、Linuxは無理ですね。

man に書いてないんだから、試すまでもないか

追記:できるっぽいので別エントリに