LoginSignup
3
2

More than 5 years have passed since last update.

fcron使ってみた

Last updated at Posted at 2014-09-15

cron - ArchWiki

ArchLinux触っていて驚くことに、cronが無い。
cronってcronだろ?という発想しかなかったので、cronって色々あるんだ・・・
というので驚いた。

anacron

yaourt anacron
  • とりあえずanacron入れてみたが、systemctlでサービス登録方法がわからなかった。
    • find /usr/lib/systemd/ -name "*cron*"で.serviceがなかったので。。

cronie

pacman -Sy cronie
  • サービス登録したが、crontabで編集したにもかかわらず実行されない・・・?

fcron

インストール
pacman -Sy fcron
systemctl enable fcron
systemctl start fcron

crontab・・・は無いので、 fcrontabを使う。

一覧表示
$ fcrontab -l
2014-09-15 06:58:43  INFO listing vagrant's fcrontab
* * * * * date >> $HOME/a.txt
  • $ fcrontab -e で編集。
$ cat a.txt
Mon Sep 15 06:53:00 UTC 2014
Mon Sep 15 06:54:00 UTC 2014
Mon Sep 15 06:55:00 UTC 2014
Mon Sep 15 06:56:00 UTC 2014
Mon Sep 15 06:57:00 UTC 2014
Mon Sep 15 06:58:00 UTC 2014
Mon Sep 15 06:59:00 UTC 2014

動作していることを確認。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2