Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DelayedCommand - to add name or other custom properties #40

Open
ba1dr opened this issue Dec 1, 2024 · 1 comment
Open

DelayedCommand - to add name or other custom properties #40

ba1dr opened this issue Dec 1, 2024 · 1 comment

Comments

@ba1dr
Copy link

ba1dr commented Dec 1, 2024

I use scheduler to run periodic tasks in a long-running daemon. There are many cases when it would be useful to have custom attributes set on the commands.
For example, having a simple name it will help to log commands run or distinguish them from each other.
It is possible to add a custom attribute to the command instance, but it is not inherited when the new command is created with next().

    cmd = PeriodicCommandFixedDelay.daily_at(tasktime, job)
    cmd.name = "my task name"
@jaraco
Copy link
Owner

jaraco commented Dec 30, 2024

That does sound useful. Would you be willing to work on an implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants