]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
crontab.d/jobs: Add. Run jobs with run-parts regularly.
authorSimon Ruderich <simon@ruderich.org>
Mon, 1 Apr 2013 20:14:13 +0000 (22:14 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 1 Apr 2013 20:14:13 +0000 (22:14 +0200)
Also add the directories jobs.hourly/, jobs.hourly8/, jobs.daily/,
jobs.weekly/, jobs.monthly/.

crontab.d/jobs [new file with mode: 0644]
crontab.d/jobs.daily/.gitignore [new file with mode: 0644]
crontab.d/jobs.hourly/.gitignore [new file with mode: 0644]
crontab.d/jobs.hourly8/.gitignore [new file with mode: 0644]
crontab.d/jobs.monthly/.gitignore [new file with mode: 0644]
crontab.d/jobs.weekly/.gitignore [new file with mode: 0644]

diff --git a/crontab.d/jobs b/crontab.d/jobs
new file mode 100644 (file)
index 0000000..de29c35
--- /dev/null
@@ -0,0 +1,34 @@
+# Run jobs on regular bases. Similar to /etc/cron.*/.
+#
+# Symlink to crontab.jobs to enable it.
+
+# Copyright (C) 2013  Simon Ruderich
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# Include user's binaries in PATH. Expanding $HOME doesn't work with cron,
+# `update.sh` handles that!
+PATH=$HOME/bin:$HOME/.shell/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+
+
+# Taken from Debian's /etc/crontab from cron package 3.0pl1-124 and modified.
+# Thanks.
+17 * * * * run-parts --report .crontab.d/jobs.hourly
+25 6 * * * run-parts --report .crontab.d/jobs.daily
+47 6 * * 7 run-parts --report .crontab.d/jobs.weekly
+52 6 1 * * run-parts --report .crontab.d/jobs.monthly
+
+# Run every 8 hours.
+39 */8 * * * run-parts --report .crontab.d/jobs.hourly8
diff --git a/crontab.d/jobs.daily/.gitignore b/crontab.d/jobs.daily/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/crontab.d/jobs.hourly/.gitignore b/crontab.d/jobs.hourly/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/crontab.d/jobs.hourly8/.gitignore b/crontab.d/jobs.hourly8/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/crontab.d/jobs.monthly/.gitignore b/crontab.d/jobs.monthly/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/crontab.d/jobs.weekly/.gitignore b/crontab.d/jobs.weekly/.gitignore
new file mode 100644 (file)
index 0000000..e69de29