I’m downloading some big files(2GB) and also I’m running a Matlab script which is unpacking the data and do some simulation, this script run as a cronjob, and sometimes the cronjob is starting before the download has finished. How can I check in Matlab whether the file is still open (downloading and writing)?
I’m downloading some big files(2GB) and also I’m running a Matlab script which is
Share
I think you should use a
.lockfile…Your cronjob should create a
.lockfile before starting downloading, and remove after it’s done.Your matlab script can check if the
.lockfile is there, to know if the file is being used by the cronjob.