Beispiel #1
0
        public bool Start(DateTimeOffset lastKnownEvent = default(DateTimeOffset))
        {
            if (!ScheduledTask.IsScheduleRunning)
            {
                ScheduledTask.StartSchedule(lastKnownEvent);

                OnStarted?.Invoke(this, new WorkerStartedEventArgs());

                Store($"{Name} has started at {DateTime.Now}");

                return(true);
            }

            return(false);
        }