You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm just a little confused, please advise if I'm doing something wrong. My understanding is that flock should CREATE a file to lock if it doesn't exist, but nothing is ever created. From man page: "It locks a specified file or directory, which is created (assuming appropriate permissions), if it does not already exist."
I'm trying to only run a script from cron if a lock cannot be acquired in order to avoid running it if it is already running (because it creates incoming connections to a server).
I have this in crontab: * 10 * * * /usr/bin/flock -n /tmp/somescript.lockfile sh /Users/me/somescript.sh
I'm on Mac OSX mojave, 10.14.6.
The text was updated successfully, but these errors were encountered:
I'm just a little confused, please advise if I'm doing something wrong. My understanding is that flock should CREATE a file to lock if it doesn't exist, but nothing is ever created. From man page: "It locks a specified file or directory, which is created (assuming appropriate permissions), if it does not already exist."
I'm trying to only run a script from cron if a lock cannot be acquired in order to avoid running it if it is already running (because it creates incoming connections to a server).
I have this in crontab:
* 10 * * * /usr/bin/flock -n /tmp/somescript.lockfile sh /Users/me/somescript.sh
I'm on Mac OSX mojave, 10.14.6.
The text was updated successfully, but these errors were encountered: