2023-07-10 08:43:33 +01:00
|
|
|
{
|
|
|
|
my $rec = $DB->get('statusreport')
|
2025-03-05 23:19:51 -05:00
|
|
|
|| $DB->new_record('statusreport', { type => 'configuration' });
|
2023-07-10 08:43:33 +01:00
|
|
|
|
|
|
|
my %props = $rec->props;
|
|
|
|
|
|
|
|
exists $props{DayOfWeek} or $props{DayOfWeek} = int(rand(7));
|
|
|
|
exists $props{Hour} or $props{Hour} = int(rand(24));
|
|
|
|
exists $props{Minute} or $props{Minute} = int(rand(60));
|
|
|
|
$rec->merge_props(%props);
|
2025-03-05 23:19:51 -05:00
|
|
|
|
|
|
|
$DB->set_prop('statusreport', "type", "configuration") if ${'statusreport'}{type} eq "service";
|
2023-07-10 08:43:33 +01:00
|
|
|
}
|