source: web/bin/sophie_cron

Last change on this file was 319, checked in by nanardon, 13 years ago
  • delete old paste in maintenance task
File size: 436 bytes
Line 
1#!/bin/env perl
2
3use strict;
4use warnings;
5use RPC::XML;
6use RPC::XML::Client;
7use Getopt::Long;
8
9GetOptions(
10        's=s' => \my $server,
11) or die "Wrong options";
12
13
14my $xmlcli = RPC::XML::Client->new($server || 'http://localhost.localdomain/rpc');
15
16my $tasks = $xmlcli->send_request('admin.maintenance.tasks');
17if (ref $tasks && !$tasks->is_fault) {
18    foreach (@{ $tasks->value || []}) {
19        $xmlcli->send_request($_);
20    }
21}
Note: See TracBrowser for help on using the repository browser.