革新的コミュニケーションツール
cronをnode.jsで実行 指定した日時や定期的に実行したいスクリプトがある場合、UNIX系OSの場合はcronを使用することが多いとおもいます。 cronとは、スクリプトを自動実行するためのデーモンプロセスで、crontabファイルに特定の書式で記述をすることにより、 指定した日時/定期日時にプログラムを実行することができます。 今回紹介するcronモジュールは、node.jsプログラム内で任意の処理をcrontabと同じ書式を使って記述することができます。 ではモジュールのインストールからサンプル作成をやってみましょう。 環境構築 今回使用した動作環境は以下のとおりです。 OS : MacOS X 10.7.4 Node.js : v0.8.15 npm : 1.1.66 適当なディレクトリを作成し、そこでnpmを使用してインストールしましょう。 % mkdir cron % cd
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く