def METHOD_NAME(action_type, action_name=None, delta_time=0,
                    scheduler=None, org_id=None, prerequisite=None):
    action_id = rhnSQL.Sequence('rhn_event_id_seq').next()
    at = rhnSQL.Table('rhnActionType', 'label')
    if not at.has_key(action_type):
        raise ValueError("Unknown action type %s" % action_type)
    params = {
        'action_id': action_id,
        'org_id': org_id,
        'action_type_id': at[action_type]['id'],
        'action_name': action_name,
        'delta': delta_time,
        'scheduler': scheduler,
        'prerequisite': prerequisite,
    }
    h = rhnSQL.prepare("""
        insert into rhnAction
               (id, org_id, action_type, name, scheduler, earliest_action, prerequisite)
        values (:action_id, :org_id, :action_type_id, :action_name, :scheduler,
                current_timestamp + numtodsinterval(:delta, 'second'), :prerequisite)
    """)
    h.execute(**params)
    return action_id