If you add a schedule with the action "AddSchedule" of SchedulGhost, the added schedule will not be saved in SchedulGhost.xml.
I need this function, therefore I have written an addition to the code of SchedulGhost, which adds an action, which saves the added schedule in SchedulGhost.xml.
Code: Select all
Actions = (
(DataToXML, "DataToXML", "Save data to xml", "Saves data to xml.", None),
I have also written an addition to the description of the action "AddSchedule".
Code: Select all
descr = u'''<rst>**Add schedule**.
In the edit box, enter a python expression with the parameters of the plan.
This may be for example *eg.result*, *eg.event.payload* or the entire list
(in the same format, what you get as a result of the action **"GetSchedule"**, see the documentation of
the python expression in this description.
This action works in two ways (depending on the existence of the schedule):
1. If the schedule with the same title already exists, its parameters are overwritten by the new ones.
2. If the title does not yet exist, the schedule is created and added to the list.
An added schedule will not be saved automatically in SchedulGhost.xml. To save the added schedule use the
SchedulGhost manager or the action "DataToXML".
This is the syntax of the python expression::
[enabled?, u'scheduleTitle', scheduleType, [expressionScheduleType], u'dateLastRun timeLastRun',\
u'eventPrefix', u'startEventSuffix', u'stopEventSuffix', u'eventPayload']
These are the different schedule types and them expressions:
* 0 (only once (or yearly)): u'startEventTime', u'span', u'date', repeatYearly?
* 1 (daily): u'startEventTime', u'span'
* 2 (weekly): u'startEventTime', u'span', daysWeek, DoNotTriggerOnAHoliday?,\
* 3 (monthly / weekday): u'startEventTime', u'span', daysWeek, monthsYear(Jan-Jun),\
* 4 (monthly / day): u'startEventTime', u'span', daysMonth(1-8), daysMonth(9-16),\
daysMonth(17-24), daysMonth(24-31), monthsYear(Jan-Jun), monthsYear(Jul-Dec)
* 5 (periodically): u'startEventTime', u'span', u'date', periodEventRepeat, timeFormat
* 6 (time span): u'00:00:00', u'span'
* enabled? = boolean expression if it is true or false (0 = false; 1 = true)
* u'scheduleTitle' = expression with a unicode string (wake_me_up)
* scheduleType = a number
* date = year-month-day (2012-12-31)
* time and span = hours:minutes:seconds (23:59:59)
* daysWeek = sum of the days (Monday = 1, Tuesday = 2; Wednesday = 4, ..., Sunday = 64)
* monthsYear(Jan-Jul) = sum of the months (January = 1, ..., June = 32)
* monthsYear(Jul-Dec) = sum of the months (July = 1, ..., December = 32)
* timeFormat: seconds = 0, minutes = 1, hours = 2, days = 3, weeks = 4, months = 5, years = 6
Make sure to use backslash' instead of ' within a string literal if you use this function in a python script.
Could I commit these code additions to the SVN repository?