Koozali.org: home of the SME Server

Obsolete Releases => SME 9.x Contribs => Topic started by: JohnG on March 27, 2017, 06:08:35 PM

Title: Affa - scheduling multiple daily runs
Post by: JohnG on March 27, 2017, 06:08:35 PM
I'm running Affa on 9.1 with latest updates. How do you schedule multiple runs of a job per day? Comma separated values for the TimeSchedule property kicks out an error when doing a configcheck:

Code: [Select]
*** ERROR: Bad value: TimeSchedule=1245,1345
Thanks in advance.

Title: Re: Affa - scheduling multiple daily runs
Post by: janet on March 28, 2017, 04:43:49 AM
JohnG

You show
TimeSchedule=1245,1345
The wiki contribs article says
'TimeSchedule'=>'1130,1530,1930',
Title: Re: Affa - scheduling multiple daily runs
Post by: brianr on March 28, 2017, 11:06:07 AM
I found that this works:

TimeSchedule=0630
TimeSchedule=1300
TimeSchedule=1830

I guess someone should change the Wiki?
Title: Re: Affa - scheduling multiple daily runs
Post by: Stefano on March 28, 2017, 11:14:43 AM
what about yourself? :-)

I see you have a wiki access
Title: Re: Affa - scheduling multiple daily runs
Post by: gieres on March 28, 2017, 12:50:07 PM
Janet,
I believe your response is good for Affa2 only.
Thanks.
Title: Re: Affa - scheduling multiple daily runs
Post by: brianr on March 28, 2017, 12:56:30 PM
what about yourself? :-)

I see you have a wiki access

I was waiting to see if someone confirmed it.....

done now:

https://wiki.contribs.org/Affa#Job_configuration_properties
Title: Re: Affa - scheduling multiple daily runs
Post by: JohnG on March 28, 2017, 03:34:55 PM
You show
TimeSchedule=1245,1345
The wiki contribs article says
'TimeSchedule'=>'1130,1530,1930',

Thanks. I believe that section of the article refers to the old way of creating affa jobs using perl. But the format of using commas between multiple HHMMs is how I remember doing it.

I found that this works:

TimeSchedule=0630
TimeSchedule=1300
TimeSchedule=1830

I guess someone should change the Wiki?

Thanks. I just tried it and according to affa --status it appears this will work but according to affa --show-schedule it won't. ¯\_(ツ)_/¯

I'll followup later on today as the job runs.



 
Title: Re: Affa - scheduling multiple daily runs
Post by: JohnG on March 29, 2017, 01:53:49 AM
Quick followup: It worked. I made three separate lines specifying 3 different times and they all kicked off appropriately. And the wiki looks good, thanks again!  :pint:
Title: Re: Affa - scheduling multiple daily runs
Post by: Jean-Philippe Pialasse on March 29, 2017, 02:53:12 AM
Thanks. I believe that section of the article refers to the old way of creating affa jobs using perl. But the format of using commas between multiple HHMMs is how I remember doing it.

Thanks. I just tried it and according to affa --status it appears this will work but according to affa --show-schedule it won't. ¯\_(ツ)_/¯

I'll followup later on today as the job runs.

looking at the exchanges, Janet was pointing the lack of quotes around the values , Did you actiually tried with the quotes around ?

if, it kicked with 3 lines, and --status is correct then this part is good, now that wiki has been updated, but it seems that there is a bug that need fixing about --show-schedule

Can you open a bug and describe the problem  in https://bugs.contribs.org/enter_bug.cgi?product=SME%20Contribs&component=smeserver-affa so there will be a trace to fix it.
Title: Re: Affa - scheduling multiple daily runs
Post by: JohnG on March 30, 2017, 04:38:13 AM
Yes, I tried it with single quotes, double quotes, as well as various versions of quoted perl, which didn't make much sense since it's a configuration file.

And yes, good point, it's minor but the show-schedule would need to be fixed. I created a bug: https://bugs.contribs.org/show_bug.cgi?id=10196

Thanks!

Title: Re: Affa - scheduling multiple daily runs
Post by: Jean-Philippe Pialasse on March 30, 2017, 08:28:57 PM
JohnG,

thank you for taking the time to answer and opening the bug. I can promise any delay have it fixed, but it will help to have it here.

Jean-Philippe