'This stops a running script and stores its active state.
It WILL NOT call the `at_stop()` hook.'

def pause(self, manual_pause=True):

    self.db._manual_pause = manual_pause
    if (not self.db._paused_time):
        task = self.ndb._task
        if task:
            self.db._paused_time = task.next_call_time()
            self.db._paused_callcount = task.callcount
            self._stop_task()
        self.is_active = False
