NAME

P2::Scheduler - This module helps organizing monthly tests at component level.

VERSION

Version 0.04

SYNOPSIS

use P2::Scheduler;

my $scheduler = P2::Scheduler->new(
    experiments     => [][],        # experiments ordered by priority (mandatory)
    weight          => [3,2,1],     # the weight of each priority, basically how many tests to run for a 
                                    # given priority (defaults to [3,2,1])
    hour_slots      => [1,2,3,4,5], # hours of the day at which tests can run (mandatory)
    spare_days_per_month => 2,      # number of business days to leave as spare at the end of the month
    starting_from   => 6,           # index of the day of the month to start from (defaults to 1)
    year            => ...          # mandatory
    num_week_days   => 3            # number of business days to count starting from Monday, defaults to 5
    pri_per_month' => [3,3,3,3,3,3,3,3,3,3,3,3] # an array for the minimum priority to take into consideration when scheduling 
                                    # experiments for each month. Default to all
                                    # priorities for all months. This is meant to be
                                    # used in case we want to limit priority 2/3
                                    # experiments only to specific months.
    selected_week_days => [3,4],    # list of business days ids to consider:
                                    # 1 => Monday,..., 5 => Friday
                                    # for example the string '2,3,4' would set tests to run only
                                    # between Tuesdays and Thursdays
    fixed_intervals => 1            # if experiments times should be strictly scheduled in 
                                    # fixed intervals or randomly allocated

);

# getting the schedule for January...
my @schedule = $scheduler->month_schedule(1);

# or for the whole year...
my @schedule = $scheduler->year_schedule();

AUTHOR

Marco Masetti, <marco.masetti at sky.uk>

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc P2::Scheduler

LICENSE AND COPYRIGHT

Copyright 2020 Marco Masetti.

This program is free software; you can redistribute it and/or modify it under the terms of the the BSD 3-Clause License.

SUBROUTINES/METHODS