GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GANTRY::UTILS::CRON (3)

.ds Aq ’

NAME

Gantry::Utils::CRON - a way to call a controller’s method from a CRON script

CONTENTS

SYNOPSIS



  use strict; use warnings;

  use Gantry::Utils::CRON;

  my $cron = Gantry::Utils::CRON->new( {
    controller      => Apps::RR::InvoiceMunger::Batch,
    conf_instance   => apps_rr_invoicemunger_dev_prod,
    conf_file       => /etc/gantry.conf,         # optional
    template_engine => TT,                       # optional
    namespace       => Apps::RR::InvoiceMunger,  # optional
  } );

  # alternative setters
  $cron->set_controller( Apps::RR::InvoiceMunger::Batch );
  $cron->set_conf_instance( invoice_munger_prod );
  $cron->set_conf_file( /etc/gantry.conf );
  $cron->set_template_engine( TT );   
  $cron->set_namespace( mynamespace );

  $cron->run( {
    method => do_process_files,          # do_* required
    args   => [ 1, 2 ],                # optional
    params => { confirm => 1, test => 3 }  # optional
    type   => post                       # or get -- optional
  } );

  print STDERR $cron->status(); 
  print STDERR $cron->content();



DESCRIPTION

This module is a utility to run a Gantry do_ method from a CRON script

METHODS

new( {} ); Standard constructor, call it first.

Required



    controller      - Gantry controller that contains the do_ method
    conf_instance   - Gantry conf instance name



Optional



    conf_file       - defaults to /etc/gantry.conf
    template_engine - defaults to TT
    namespace



run( {} ) This method executes the defined controller’s do_ method.

Accepts



  method - the do_ method
  args   - array of args to be passed to the method
  params - hashref of params to be passed to method
  type   - get or post defaults to post



Returns



  status  - page status code
  content - plain-text version of methods returned content



set_content setter for the returned content
content getter for the returned content
set_status setter for the returned status
status getter for the returned status
set_controller setter for controller
controller getter for controller
set_conf_instance setter for the Gantry conf_instance
conf_instance getter for the Gantry conf_instance
set_conf_file setter for the Gantry conf_file.
conf_file getter for the Gantry conf_file. Defaults to /etc/gantry.conf

SEE ALSO

Gantry(3)

LIMITATIONS

This module depends on Gantry(3), HTML::TreeBuilder, HTML::FormatText

AUTHOR

Tim Keefer <tim@timkeefer.com>

COPYRIGHT and LICENSE

Copyright (c) 2007, Tim Keefer.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 GANTRY::UTILS::CRON (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.