'Called every time the script is started (for persistent
scripts, this is usually once every server start)
Args:
force_restart (bool, optional): Normally an already
started script will not be started again. if
`force_restart=True`, the script will always restart
the script, regardless of if it has started before.
Returns:
result (int): 0 or 1 depending on if the script successfully
started or not. Used in counting.'

def start(self, force_restart=False):

    if (self.is_active and (not force_restart)):
        return 0
    obj = self.obj
    if obj:
        try:
            obj.cmdset
        except AttributeError:
            logger.log_trace()
            self.is_active = False
            return 0
    try:
        if self.unpause(manual_unpause=False):
            return 1
    except RuntimeError:
        return 0
    self.is_active = True
    try:
        self.at_start()
    except Exception:
        logger.log_trace()
    if (self.db_interval > 0):
        self._start_task()
    return 1
