[MKDoc-commit] [1.6] create newsletter cronjobs
bruno at mkdoc.demon.co.uk
bruno at mkdoc.demon.co.uk
Thu Dec 2 15:22:41 GMT 2004
Log Message:
-----------
[1.6] create newsletter cronjobs
Tags:
----
mkdoc-1-6
Modified Files:
--------------
mkd/tools:
install-details-gt.pl
-------------- next part --------------
Index: install-details-gt.pl
===================================================================
RCS file: /var/spool/cvs/mkd/tools/install-details-gt.pl,v
retrieving revision 1.21.2.16
retrieving revision 1.21.2.17
diff -Ltools/install-details-gt.pl -Ltools/install-details-gt.pl -u -r1.21.2.16 -r1.21.2.17
--- tools/install-details-gt.pl
+++ tools/install-details-gt.pl
@@ -245,6 +245,18 @@
};
+print "Creating Newsletter cronjobs\n";
+my $config_site_dir = $MKDoc::Site::Config::CONFIG->{site_dir};
+
+require GPanel::Crontab;
+my $c = GPanel::Crontab->new(user => $user_name);
+my $rand_60 = int (rand (60));
+$c->add_raw->value("$rand_60 8 * * * source $config_site_dir/mksetenv.sh && 020..newsletter.pl day");
+$c->add_raw->value("$rand_60 8 * * mon source $config_site_dir/mksetenv.sh && 020..newsletter.pl week");
+$c->add_raw->value("$rand_60 8 1 * * source $config_site_dir/mksetenv.sh && 020..newsletter.pl month");
+$c->write;
+
+
unless ($MKDoc::Site::Config::CONFIG->{imap_user}) {
$MKDoc::Site::Config::CONFIG->{imap_user} = $MKDoc::Site::Config::CONFIG->{database_user};
$MKDoc::Site::Config::CONFIG->{imap_host} = 'localhost';
More information about the MKDoc-commit
mailing list