Replies: 1 comment
|
This is how you can get parent cron ticker Id from occurence Id. // Make sure you have injected this in your class first
ITickerPersistenceProvider<TimeTickerEntity, CronTickerEntity> persistenceProvider
// And then get that occurence:
CancellationToken cancellationToken = default;
// "occurences" will always return 1 occurence
var occurrences = await persistenceProvider.GetAllCronTickerOccurrences(o => o.Id == context.Id, cancellationToken);
var occurrence = occurrences.FirstOrDefault();
// This is the parent cron ticker Id
Guid cronTickerId = occurrence?.CronTickerId ?? Guid.Empty; |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I want to know where i can get Id of current CronTicker inside the TickerFunction.
This Cron job may be created with Dashboard, not from code, so i may can't not store the CronId in somewhere else to reuse inside the TickerFunction.
All reactions