]> git.openstreetmap.org Git - chef.git/commitdiff
Run civicrm batch jobs every 15 minutes
authorTom Hughes <tom@compton.nu>
Tue, 25 Mar 2014 11:06:41 +0000 (11:06 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 25 Mar 2014 11:06:51 +0000 (11:06 +0000)
cookbooks/civicrm/recipes/default.rb
cookbooks/civicrm/templates/default/cron.erb [new file with mode: 0644]

index fc3c77e91e08e2f8276ef82caf0a954998747414..dce923a0633f255d5e69c32f092763be674d21ec 100644 (file)
@@ -126,10 +126,18 @@ file "#{civicrm_directory}/civicrm.settings.php" do
   content settings
 end
 
+template "/etc/cron.d/osmf-crm" do
+  source "cron.erb"
+  owner "root"
+  group "root"
+  mode 0644
+  variables :directory => civicrm_directory, :passwords => passwords
+end
+
 template "/etc/cron.daily/osmf-crm-backup" do
   source "backup.cron.erb"
-  owner "wordpress"
-  group "wordpress"
+  owner "root"
+  group "root"
   mode 0750
   variables :passwords => passwords
 end
diff --git a/cookbooks/civicrm/templates/default/cron.erb b/cookbooks/civicrm/templates/default/cron.erb
new file mode 100644 (file)
index 0000000..e59bde0
--- /dev/null
@@ -0,0 +1,3 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+*/15 * * * * www-data php <%= @directory %>/civicrm/bin/cli.php -s crm.osmfoundation.org -u batch -p "<%= @passwords["batch"] %>" -e Job -a execute