-FFDIR=/usr/share/@OLDPACKAGE@
-FFCRON=/usr/share/@OLDPACKAGE@/cronjobs
-FFUSER=@OLDPACKAGE@
-
-# You may need to change the pathname to php CLI (command line interface)
-PHP="/usr/bin/php -q -d include_path=.:/etc/@OLDPACKAGE@:/usr/share/@OLDPACKAGE@:/usr/share/@OLDPACKAGE@/www/include"
-
-# Don't mail command output to anyone.
-MAILTO=""
-
+PATH=/usr/share/@OLDPACKAGE@/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Daily site backup
-0 2 * * * root $PHP $FFCRON/backup_site.php
+0 2 * * * root forge_run_job backup_site.php
# Daily incremental backup to /backup
# we have to discuss this
-#15 23 * * * root $FFCRON/@OLDPACKAGE@-db-backup.sh
+#15 23 * * * root forge_run_job @OLDPACKAGE@-db-backup.sh
-FFCRON="/opt/gforge/cronjobs"
-FFUSER=gforge
-
-# You may need to change the pathname to php CLI (command line interface)
-PHP="/usr/bin/php -f"
-
-# Don't mail command output to anyone.
-MAILTO=""
-
#
# Regular cron jobs for the db-postgresql package
#
# Daily reporting process
-25 7 * * * $FFUSER $PHP $FFCRON/reporting_cron.php
+25 7 * * * root forge_run_job reporting_cron.php
# Recalculate user popularity metric
-25 1 * * * $FFUSER $PHP $FFCRON/calculate_user_metric.php
+25 1 * * * root forge_run_job calculate_user_metric.php
# Daily recalculate of the sums under the trove map
-30 1 * * * $FFUSER $PHP $FFCRON/db_trove_maint.php
+30 1 * * * root forge_run_job db_trove_maint.php
# Daily deletion of sessions, closing jobs, etc
-35 1 * * * $FFUSER $PHP $FFCRON/project_cleanup.php
+35 1 * * * root forge_run_job project_cleanup.php
# Daily crunching of survey data and other associated ratings
-40 1 * * * $FFUSER $PHP $FFCRON/rating_stats.php
+40 1 * * * root forge_run_job rating_stats.php
# Daily crunching of project summary data (counts)
-42 1 * * * $FFUSER $PHP $FFCRON/db_project_sums.php
+42 1 * * * root forge_run_job db_project_sums.php
# Daily close pending artifacts
-43 1 * * * $FFUSER $PHP $FFCRON/check_stale_tracker_items.php
+43 1 * * * root forge_run_job check_stale_tracker_items.php
# Daily project_weekly_metric recalc
-12 1 * * * $FFUSER $PHP $FFCRON/project_weekly_metric.php
+12 1 * * * root forge_run_job project_weekly_metric.php
# Daily rotation of the activity_log
-0 0 * * * $FFUSER $PHP $FFCRON/rotate_activity.php
+0 0 * * * root forge_run_job rotate_activity.php
# Daily aggregating of the numbers
-15 0 * * * $FFUSER $PHP $FFCRON/site_stats.php
+15 0 * * * root forge_run_job site_stats.php
# Daily sweep of the stats into final tables
-45 0 * * * $FFUSER $PHP $FFCRON/db_stats_agg.php
+45 0 * * * root forge_run_job db_stats_agg.php
# Daily reindex search engine doc_data , if any
-0 4 * * * root $PHP $FFCRON/update_docdata_dataword.php
+0 4 * * * root forge_run_job update_docdata_dataword.php
# Hourly send pending massmailings, if any
-48 * * * * root $PHP $FFCRON/massmail.php
+48 * * * * root forge_run_job massmail.php
# Weekly db vacuum (should be done after ALL OTHER JOBS)
-50 2 * * 1 $FFUSER $PHP $FFCRON/vacuum.php
+# 50 2 * * 1 root forge_run_job vacuum.php
# Create SCM repositories
-0 * * * * root $PHP $FFCRON/create_scm_repos.php
+0 * * * * root forge_run_job create_scm_repos.php
# Gather commit stats from SCM repositories
-0 2 * * * root $PHP $FFCRON/gather_scm_stats.php
+0 2 * * * root forge_run_job gather_scm_stats.php
# Generate snapshots and tarballs from SCM repositories
-0 3 * * * root $PHP $FFCRON/generate_scm_snapshots.php
+0 3 * * * root forge_run_job generate_scm_snapshots.php
# this cronjob analyse the apache log and instert them in the db table stats_subd_pages
# this is not used in fusionforge IHM.
# Daily sweep of the HTTP log files for project activity
-#15 0 * * * $FFUSER $FFCRON/stats_projects_logparse.pl
+#15 0 * * * root forge_run_job stats_projects_logparse.pl
# this cronjob send a mail to the admin with all news that have been posted less than 30 days and that have not be validated.
# Daily mail for not approved news
-#30 17 * * * root $FFCRON/get_news_notapproved.pl
+#30 17 * * * root forge_run_job get_news_notapproved.pl
# Daily site backup
-0 2 * * * root $PHP $FFCRON/backup_site.php
+0 2 * * * root forge_run_job backup_site.php
#
# IMPORTANT!! READ THE README.root file before continuing!
#
# Create the new mailing lists
-06 * * * * root $PHP $FFCRON/mail/mailing_lists_create.php
+06 * * * * root forge_run_job mail/mailing_lists_create.php
# Create the /etc/aliases file
-08 * * * * root $PHP $FFCRON/mail/mailaliases.php
+08 * * * * root forge_run_job mail/mailaliases.php
# Send email to users with pending tasks
-#30 5 * * 1,2,3,4,5 root $PHP $FFCRON/daily_task_email.php
+#30 5 * * 1,2,3,4,5 root forge_run_job daily_task_email.php
#
# Daily reporting process
-25 7 * * * $FFUSER $PHP $FFCRON/reporting_cron.php
+25 7 * * * root forge_run_job reporting_cron.php
# Recalculate user popularity metric
-25 1 * * * $FFUSER $PHP $FFCRON/calculate_user_metric.php
+25 1 * * * root forge_run_job calculate_user_metric.php
# Daily recalculate of the sums under the trove map
-30 1 * * * $FFUSER $PHP $FFCRON/db_trove_maint.php
+30 1 * * * root forge_run_job db_trove_maint.php
# Daily deletion of sessions, closing jobs, etc
-35 1 * * * $FFUSER $PHP $FFCRON/project_cleanup.php
+35 1 * * * root forge_run_job project_cleanup.php
# Daily crunching of survey data and other associated ratings
-40 1 * * * $FFUSER $PHP $FFCRON/rating_stats.php
+40 1 * * * root forge_run_job rating_stats.php
# Daily crunching of project summary data (counts)
-42 1 * * * $FFUSER $PHP $FFCRON/db_project_sums.php
+42 1 * * * root forge_run_job db_project_sums.php
# Daily close pending artifacts
-43 1 * * * $FFUSER $PHP $FFCRON/check_stale_tracker_items.php
+43 1 * * * root forge_run_job check_stale_tracker_items.php
# Daily project_weekly_metric recalc
-12 1 * * * $FFUSER $PHP $FFCRON/project_weekly_metric.php
+12 1 * * * root forge_run_job project_weekly_metric.php
# Daily rotation of the activity_log
-0 0 * * * $FFUSER $PHP $FFCRON/rotate_activity.php
+0 0 * * * root forge_run_job rotate_activity.php
# Daily aggregating of the numbers
-15 0 * * * $FFUSER $PHP $FFCRON/site_stats.php
+15 0 * * * root forge_run_job site_stats.php
# Daily sweep of the stats into final tables
-45 0 * * * $FFUSER $PHP $FFCRON/db_stats_agg.php
+45 0 * * * root forge_run_job db_stats_agg.php
# Hourly send pending massmailings, if any
-48 * * * * root $PHP $FFCRON/massmail.php
+48 * * * * root forge_run_job massmail.php
# Weekly db vacuum (should be done after ALL OTHER JOBS)
-50 2 * * 1 $FFUSER $PHP $FFCRON/vacuum.php
+50 2 * * 1 root forge_run_job vacuum.php
# Create SCM repositories
-0 * * * * root $PHP $FFCRON/create_scm_repos.php
+0 * * * * root forge_run_job create_scm_repos.php
# Gather commit stats from SCM repositories
-0 2 * * * root $PHP $FFCRON/gather_scm_stats.php
+0 2 * * * root forge_run_job gather_scm_stats.php
# Generate snapshots and tarballs from SCM repositories
-0 3 * * * root $PHP $FFCRON/generate_scm_snapshots.php
+0 3 * * * root forge_run_job generate_scm_snapshots.php
# this cronjob analyse the apache log and instert them in the db table stats_subd_pages
# this is not used in fusionforge IHM.
# Daily sweep of the HTTP log files for project activity
-#15 0 * * * $FFUSER $FFCRON/stats_projects_logparse.pl
+#15 0 * * * root forge_run_job stats_projects_logparse.pl
# this cronjob send a mail to the admin with all news that have been posted less than 30 days and that have not be validated.
# Daily mail for not approved news
-30 17 * * * root $FFCRON/get_news_notapproved.pl
+30 17 * * * root forge_run_job get_news_notapproved.pl
# THIS FILE IS GENERATED, PLEASE DON'T EDIT, RATHER USE Makefile
-FFDIR=/usr/share/@OLDPACKAGE@
-FFCRON=/usr/share/@OLDPACKAGE@/cronjobs
-FFUSER=@OLDPACKAGE@
-
-# You may need to change the pathname to php CLI (command line interface)
-PHP="/usr/bin/php -q -d include_path=.:/etc/@OLDPACKAGE@:/usr/share/@OLDPACKAGE@:/usr/share/@OLDPACKAGE@/www/include"
-
-# Don't mail command output to anyone.
-MAILTO=""
-
+PATH=/usr/share/@OLDPACKAGE@/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#
# Regular cron jobs for the db-postgresql package
#
# Daily reporting process
-25 7 * * * $FFUSER $PHP $FFCRON/reporting_cron.php
+25 7 * * * root forge_run_job reporting_cron.php
# Recalculate user popularity metric
-25 1 * * * $FFUSER $PHP $FFCRON/calculate_user_metric.php
+25 1 * * * root forge_run_job calculate_user_metric.php
# Daily recalculate of the sums under the trove map
-30 1 * * * $FFUSER $PHP $FFCRON/db_trove_maint.php
+30 1 * * * root forge_run_job db_trove_maint.php
# Daily deletion of sessions, closing jobs, etc
-35 1 * * * $FFUSER $PHP $FFCRON/project_cleanup.php
+35 1 * * * root forge_run_job project_cleanup.php
# Daily crunching of survey data and other associated ratings
-40 1 * * * $FFUSER $PHP $FFCRON/rating_stats.php
+40 1 * * * root forge_run_job rating_stats.php
# Daily crunching of project summary data (counts)
-42 1 * * * $FFUSER $PHP $FFCRON/db_project_sums.php
+42 1 * * * root forge_run_job db_project_sums.php
# Daily close pending artifacts
-43 1 * * * $FFUSER $PHP $FFCRON/check_stale_tracker_items.php
+43 1 * * * root forge_run_job check_stale_tracker_items.php
# Daily project_weekly_metric recalc
-12 1 * * * $FFUSER $PHP $FFCRON/project_weekly_metric.php
+12 1 * * * root forge_run_job project_weekly_metric.php
# Daily rotation of the activity_log
-0 0 * * * $FFUSER $PHP $FFCRON/rotate_activity.php
+0 0 * * * root forge_run_job rotate_activity.php
# Daily aggregating of the numbers
-15 0 * * * $FFUSER $PHP $FFCRON/site_stats.php
+15 0 * * * root forge_run_job site_stats.php
# Daily sweep of the stats into final tables
-45 0 * * * $FFUSER $PHP $FFCRON/db_stats_agg.php
+45 0 * * * root forge_run_job db_stats_agg.php
# Hourly send pending massmailings, if any
-48 * * * * root $PHP $FFCRON/massmail.php
+48 * * * * root forge_run_job massmail.php
# Weekly db vacuum (should be done after ALL OTHER JOBS)
-50 2 * * 1 $FFUSER $PHP $FFCRON/vacuum.php
+50 2 * * 1 root forge_run_job vacuum.php
# Create SCM repositories
-0 * * * * root $PHP $FFCRON/create_scm_repos.php
+0 * * * * root forge_run_job create_scm_repos.php
# Gather commit stats from SCM repositories
-0 2 * * * root $PHP $FFCRON/gather_scm_stats.php
+0 2 * * * root forge_run_job gather_scm_stats.php
# Generate snapshots and tarballs from SCM repositories
-0 3 * * * root $PHP $FFCRON/generate_scm_snapshots.php
+0 3 * * * root forge_run_job generate_scm_snapshots.php
# this cronjob analyse the apache log and instert them in the db table stats_subd_pages
# this is not used in fusionforge IHM.
# Daily sweep of the HTTP log files for project activity
-#15 0 * * * $FFUSER $FFCRON/stats_projects_logparse.pl
+#15 0 * * * root forge_run_job stats_projects_logparse.pl
# this cronjob send a mail to the admin with all news that have been posted less than 30 days and that have not be validated.
# Daily mail for not approved news
-30 17 * * * root $FFCRON/get_news_notapproved.pl
+30 17 * * * root forge_run_job get_news_notapproved.pl
# Daily site backup
-0 2 * * * root $PHP $FFCRON/backup_site.php
+0 2 * * * root forge_run_job backup_site.php
#
# IMPORTANT!! READ THE README.root file before continuing!
#
# Create the shell users accounts and groups home directories
-15 * * * * root $PHP $FFCRON/homedirs.php
+15 * * * * root forge_run_job homedirs.php
# Create the new mailing lists
-06 * * * * root $PHP $FFCRON/mail/mailing_lists_create.php
+06 * * * * root forge_run_job mail/mailing_lists_create.php
# Create the /etc/aliases file
-08 * * * * root $PHP $FFCRON/mail/mailaliases.php
+08 * * * * root forge_run_job mail/mailaliases.php
# Send email to users with pending tasks
-#30 5 * * 1,2,3,4,5 root $PHP $FFCRON/daily_task_email.php
+#30 5 * * 1,2,3,4,5 root forge_run_job daily_task_email.php
#
# Create the shell users accounts and groups home directories
-15 * * * * root $PHP $FFCRON/homedirs.php
+15 * * * * root forge_run_job homedirs.php
#
# Mailing-list creation
-55 * * * * root $PHP $FFCRON/mail/mailing_lists_create.php
+55 * * * * root forge_run_job mail/mailing_lists_create.php
# Create the new mailing lists
-06 * * * * root $PHP $FFCRON/mail/mailing_lists_create.php
+06 * * * * root forge_run_job mail/mailing_lists_create.php
# Create the /etc/aliases file
-08 * * * * root $PHP $FFCRON/mail/mailaliases.php
+08 * * * * root forge_run_job mail/mailaliases.php
# Send email to users with pending tasks
-#30 5 * * 1,2,3,4,5 root $PHP $FFCRON/daily_task_email.php
+#30 5 * * 1,2,3,4,5 root forge_run_job daily_task_email.php
deb-specific/install-ssh.sh usr/share/@OLDPACKAGE@/bin/
utils/include.pl usr/share/@OLDPACKAGE@/lib/
utils/forge_get_config usr/share/@OLDPACKAGE@/bin/
+utils/forge_run_job usr/share/@OLDPACKAGE@/bin/
+utils/forge_run_plugin_job usr/share/@OLDPACKAGE@/bin/
utils/migrate-to-ini-files.sh usr/share/@OLDPACKAGE@/bin/
#
deb-specific/user_dump_update.pl usr/share/@OLDPACKAGE@/bin/
-FFCRON="/usr/share/gforge/cronjobs"
-FFUSER=gforge
-
-# You may need to change the pathname to php CLI (command line interface)
-PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include:/usr/share/gforge/plugins"
-
-# Don't mail command output to anyone.
-MAILTO=""
-
#
# Regular cron jobs for the lists-mailman package
#
+PATH=/usr/share/@OLDPACKAGE@/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Mailman-list creation
-* * * * * root $PHP $FFCRON/manage_mailmanlists.php
+* * * * * root forge_run_job manage_mailmanlists.php
-FFDIR=/usr/share/@OLDPACKAGE@
-MWCRON=/usr/share/@OLDPACKAGE@/plugins/mediawiki/cronjobs
-FFUSER=gforge
-
-# You may need to change the pathname to php CLI (command line interface)
-PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include:/usr/share/gforge/plugins"
-
-# Don't mail command output to anyone.
-MAILTO=""
-
#
# Regular cron jobs for the plugin-mediawiki package
#
+PATH=/usr/share/@OLDPACKAGE@/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
# Create new mediawikis four times an hour
-0,15,30,45 * * * * root [ -x $MWCRON/create-wikis.php ] && $PHP $MWCRON/create-wikis.php
-1,16,31,46 * * * * root [ -x $MWCRON/create-imagedirs.php ] && $PHP $MWCRON/create-imagedirs.php
+0,15,30,45 * * * * root forge_run_plugin_job mediawiki create-wikis.php
+1,16,31,46 * * * * root forge_run_plugin_job mediawiki create-imagedirs.php
# Create wiki XML dumps every night
-55 1 * * * root [ -x $MWCRON/dump-wikis.php ] && $PHP $MWCRON/dump-wikis.php
+55 1 * * * root forge_run_plugin_job mediawiki dump-wikis.php
-FFDIR=/usr/share/@OLDPACKAGE@
-MWCRON=/usr/share/@OLDPACKAGE@/plugins/moinmoin/cronjobs
-FFUSER=gforge
-
-# You may need to change the pathname to php CLI (command line interface)
-PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include:/usr/share/gforge/plugins"
-
-# Don't mail command output to anyone.
-MAILTO=""
-
#
# Regular cron jobs for the plugin-moinmoin package
#
+PATH=/usr/share/@OLDPACKAGE@/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Create new wikis four times an hour
-0,15,30,45 * * * * root [ -x $MWCRON/create-wikis.php ] && $PHP $MWCRON/create-wikis.php
+0,15,30,45 * * * * root forge_run_plugin_job moinmoin create-wikis.php
--- /dev/null
+#! /usr/bin/php -f
+<?php
+/**
+ * FusionForge
+ *
+ * Copyright 2012, Roland Mas
+ *
+ * This file is part of FusionForge. FusionForge 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 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge 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 FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+require (dirname(__FILE__).'/../common/include/env.inc.php');
+require_once $gfcommon.'include/pre.php';
+
+if (count ($argv) < 2) {
+ echo "Usage: .../forge_run_job <jobname> [ <parameter> ... ]
+" ;
+ exit (1) ;
+}
+$self = array_shift($argv);
+
+
+$job = array_shift($argv);
+$path = forge_get_config('source_path').'/cronjobs/';
+$script = $path.$job;
+
+if (! is_executable($script)) {
+ print "Cron job $script not found or not executable.\n" ;
+ // exit (1) ;
+}
+
+$cmdline = $script;
+while ($arg = array_shift($argv)) {
+ $cmdline .= ' '.escapeshellarg($arg);
+}
+
+system ("$cmdline\n");
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
--- /dev/null
+#! /usr/bin/php -f
+<?php
+/**
+ * FusionForge
+ *
+ * Copyright 2012, Roland Mas
+ *
+ * This file is part of FusionForge. FusionForge 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 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge 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 FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+require (dirname(__FILE__).'/../common/include/env.inc.php');
+require_once $gfcommon.'include/pre.php';
+
+if (count ($argv) < 2) {
+ echo "Usage: .../forge_run_plugin_job <plugin> <jobname> [ <parameter> ... ]
+" ;
+ exit (1) ;
+}
+$self = array_shift($argv);
+
+$plugin = array_shift($argv);
+if (! plugin_get_object($plugin)) {
+ print "No such plugin $plugin.\n" ;
+ // exit (1) ;
+}
+
+$job = array_shift($argv);
+$path = forge_get_config('source_path')."/plugins/$plugin/cronjobs/";
+$script = $path.$job;
+
+if (! is_executable($script)) {
+ print "Cron job $script not found or not executable.\n" ;
+ // exit (1) ;
+}
+
+$cmdline = $script;
+while ($arg = array_shift($argv)) {
+ $cmdline .= ' '.escapeshellarg($arg);
+}
+
+system ("$cmdline\n");
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End: