Page 1 of 1

Date added not recalculating?

PostPosted: Sun Sep 04, 2016 10:03 pm
by gtreece
I recently updated from Hazel 3 to Hazel 4. I have had a set of rules running for a year or more, and after the upgrade, they started behaving differently.

In stepping through them with some sample files, I can see that the 'Date Added' tag is not recalculating as the file moves to new folders. Here's the basic workflow:

image dropped into a 'drop' folder
Hazel rule watching the folder:
Date added not in the last 1 minute (this seems to work correctly)
Move to 'archive' folder
Copy to input folder on image processor

Image processor puts new copy of image into output folder and deletes original file from input folder
Hazel rule watching output folder:
Date added not in the last 1 minute (this is failing, file shows date added from above step, not from when it was created in the output folder)
Move to FTP folder

So the net result is that as soon as the new output image is created, the next hazel rule is picking it up, and I need a little delay there.

I can probably find some ways around this, but I thought that the date added field was re-calculated each time a file was moved. In this case, not only is it surviving a move, but it's also surviving a new version of the file being created by an external image processor. It was working that way at least.

Re: Date added not recalculating?

PostPosted: Tue Sep 06, 2016 10:12 am
by Mr_Noodle
Date added is assigned by the operating system so I would first look there. Also, if you want to process files when they are added, a better way to do it is "Date added is after date last matched".

Re: Date added not recalculating?

PostPosted: Tue Sep 06, 2016 6:56 pm
by gtreece
Mr_Noodle wrote:Date added is assigned by the operating system so I would first look there.

This led me back to the server that hosts the folders, which was 2-3 minutes behind the client on it's clock setting. That is corrected now. But that difference is what was creating the confusion/problem on the date added time.


Mr_Noodle wrote:Also, if you want to process files when they are added, a better way to do it is "Date added is after date last matched".

I have tried this, and had trouble. To be fair, that was before I discovered the server time difference, so that was probably why I had trouble.

Basically, on the 'drop' folder, I just wanted to be sure any file write operations were completed before Hazel started working with the file, so I have been using 'date added is not in the last 1 minute', to allow any server/client Finder lag to settle when new files are dropped in. If you think there is a more reliable way to ensure that a file is not busy (is truly done writing into the folder), I'll go with that.

Re: Date added not recalculating?

PostPosted: Wed Sep 07, 2016 12:06 pm
by Mr_Noodle
If you want a delay, then that should do it. I think the clocks out of sync will definitely cause problems. With that fixed, keep an eye on it and see if it works after that.