This message was deleted.
# plugin-development
s
This message was deleted.
g
I don't think there is one. You could leave a file somewhere, and check its modification time
r
but how could I make then the task as not already done?
I was already thinking about an input with the current date
v
Do you want to not execute the task for 24 hours even if other inputs or outputs changed? Or do you want to rerun the task as soon as any inputs or outputs changed but additionally if 24 hours have passed?
r
I want to force that the task is executed after 24 hours again even if no other inputs are changed. If other inputs are changed it should be executed directly as expected
v
There are multiple options. One is having the date as input property as you suggested, but that could of course mean, that if you execute at 23:59 it will be executed again on 00:01. Another one is saving the last execution time in a file output and then in
outputs.upToDateWhen { ... }
check whether the 24 hours have passed. I wouldn't use the file modification time though, but just write the time to the file and read it from there.
r
Would you say that using the creation time is safe too? I am aware that the modfication time is not written on some file systems
v
That's not the only point. If you for example use build cache, both times are irrelevant. I stick with my recommendation, write the date to a file.
r
thx for that hint
👌 1