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

What happens if I run the command twice? #27

Closed
ghost opened this issue Jan 27, 2016 · 3 comments
Closed

What happens if I run the command twice? #27

ghost opened this issue Jan 27, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 27, 2016

If I run this command twice

/home/user/.script/unrarall -s --clean=all /source_parent_dir

Will the second run of the script not overlap the first command?

I'm thinking in the situation, where I want a cron job to run the command every 1 minute. The first run may still be processing when the second cron kicks off

@ghost
Copy link
Author

ghost commented Jan 27, 2016

I guess I can use http://linux.die.net/man/1/flock ... seems to be a better approach than implementing something in each individual program

https://ma.ttias.be/prevent-cronjobs-from-overlapping-in-linux/

@delcypher
Copy link
Collaborator

@meffect It's not safe to run multiple copies of unrarall at the same time. Using something like flock seems like a good idea as I don't want to add additional code to unrarall to detect for this.

@ghost
Copy link
Author

ghost commented Jan 27, 2016

Sounds good. Good to know it's not built in, so I can account for it

@ghost ghost closed this as completed Jan 30, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant