I'm exploring NCron to be used as a scheduler host for running several sftp jobs. Is there any way to restrict the job from running if already an existing instance is running? I have gone through the wiki but can't find any details on this.
How to run only a single instance of NCron job at any time
133 Views Asked by lyf At
1
There are 1 best solutions below
Related Questions in NCRON
- azure function running locally - cron timer not using UTC
- NCron expression "0 0/5 19-7 * * Mon,Tue,Wed" failed to parse azure functions
- Two Timer Triggers on Azure Function With Params
- Weird version conflict: The type 'CrontabSchedule' exists in both 'NCrontab.Signed, Version=3.2.20120.0' and 'NCrontab, Version=3.2.20120.0'
- Running an azure function on a specific time for only once?
- C# how to access non-public members for NCrontab?
- Configure cron job that is executing every 15 minutes on Hangfire
- How to run only a single instance of NCron job at any time
- MVC scheduled mail sending
- NCron default logger writes to Event Log, throws SecurityException
- Passing Arugments to NCron Job
- NCron .NET Scheduling Issue
- NCron - cannot see job
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Ensuring that a job is not executed multiple times in parallel can be done by wrapping the body of the
Execute()method in alockblock. However, due to the nature of thelockstatement, this will cause executions of the job in question to be queued, which may or may not be what you want.If you would rather that the execution of the job is skipped when the job is already running, this can be solved with a
static booland and a littlelock,ifandtry. Here is a first and untested attempt at building a base class for such jobs: https://gist.github.com/schourode/7639291I would love to receive feedback on this experiment. If successful, this could very well make it into the NCron core assembly.