You can edit a calendar keyword using the script function :SET_CALE. Unfortunately, no calendar calculation is triggered while this script statement is being processed. Instead you have to open and store the calendar object manually so that the calendar will be recalculated - not good for an automation...
Create a new script function to trigger a calendar calculation e.g.
:CALE_CALC objectname, [RECURSIVE]