Bläddra i källkod

cron job

master
förälder
incheckning
eea1390491
5 ändrade filer med 40 tillägg och 0 borttagningar
  1. +1
    -0
      tasks/configure.yml
  2. +17
    -0
      tasks/cron.yml
  3. +2
    -0
      tasks/main.yml
  4. +10
    -0
      templates/nextcloud-cron.service
  5. +10
    -0
      templates/nextcloud-cron.timer

+ 1
- 0
tasks/configure.yml Visa fil

@@ -5,6 +5,7 @@
with_items:
- config:system:set trusted_domains 1 --value={{inventory_hostname}}
- maintenance:update:htaccess
- background:cron
args:
chdir: /var/www/nextcloud
become: true


+ 17
- 0
tasks/cron.yml Visa fil

@@ -0,0 +1,17 @@
---

- name: cron service
template:
src: nextcloud-cron.service
dest: /etc/systemd/system/nextcloud-cron.service

- name: cron timer
template:
src: nextcloud-cron.timer
dest: /etc/systemd/system/nextcloud-cron.timer

- name: cron timer started and enabled
systemd:
name: nextcloud-cron.timer
state: started
enabled: yes

+ 2
- 0
tasks/main.yml Visa fil

@@ -24,3 +24,5 @@
- include: upgrade.yml

- include: apache2.yml

- include: cron.yml

+ 10
- 0
templates/nextcloud-cron.service Visa fil

@@ -0,0 +1,10 @@
[Unit]
Description=nextcloud cron job

[Service]
User=www-data
Group=www-data
ExecStart=/usr/bin/php -f /var/www/nextcloud/cron.php

[Install]
WantedBy=basic.target

+ 10
- 0
templates/nextcloud-cron.timer Visa fil

@@ -0,0 +1,10 @@
[Unit]
Description=run nextcloud cron job every 15 minutes

[Timer]
OnBootSec=5min
OnUnitActiveSec=15min
Unit=nextcloud-cron.service

[Install]
WantedBy=timers.target

Laddar…
Avbryt
Spara