Skip to content

[Command] Add support for single-process commands #3586

Closed
@pkruithof

Description

@pkruithof

I frequently need a command to only run by one process at a time. Most of the time this command would be invoked by a cronjob, but it would not have finished by the time the crontab executes this command again (think long imports and such).

It's fairly easy to fix this by setting a pidfile, and checking for existence (and running process), but it's tedious to do this, and I think it would be a nice feature to implement a "isSingleProcess" method in your command, or something, to accomplish this.

I have implemented this myself, and so if this is a desired feature, I can attach some code to this issue. Also, I'm not really sure what the technical term for this is (it's not a daemon, but I don't know how this is commonly called).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions