Exemple #1
0
    public async Task RegisterJobEpicGamesBroadcaster()
    {
        var feature = await _featureService.GetFeatureConfig("epic-games");

        var allowAt = feature?.AllowsAt;

        allowAt?.ForEach(
            target => {
            var chatId = target.ToInt64();
            var jobId  = "egs-free-" + chatId.ReduceChatId();
            _recurringJobManager.AddOrUpdate(
                recurringJobId: jobId,
                methodCall: () => SendEpicGamesBroadcaster(chatId),
                cronExpression: Cron.Minutely
                );
        }
            );
    }