Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
png
find_interval1.png 94.7 kB 1 19-May-2023 11:17 Sanci
png
find_interval2.png 33.1 kB 1 19-May-2023 11:23 Sanci
png
find_interval3.png 25.5 kB 1 19-May-2023 12:47 Sanci
png
find_interval4.png 25.2 kB 1 19-May-2023 12:54 Sanci

This page (revision-12) was last changed on 19-May-2023 13:13 by Sandor

This page was created on 19-May-2023 11:15 by Sanci

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed one line
Sometimes there is a need to find items modified in an interval of time. This example helps to develop a job to facilitate this.
Sometimes we need to find items modified in an interval of time. This example helps to develop a condition-checker task chain in a job to facilitate the demand.
At line 3 added one line
[attachments|find_interval1.png]
At line 5 added one line
In the __UserVariable__ task, the olderthan_days and newerthan_days variables are to ease the adjustment of the job. Whenever there is a need to alter the interval, only these two variables have to be edited, every other aspect of the configuration can be left untouched. In this example, we are interested in items (files and folders) modified in the interval between 5 and 10 days ago.
At line 5 changed one line
The Find task doesn't need much adjustment but the Depth of the folder structure has to be considered and the task configured accordingly.
[attachments|find_interval2.png]
Values/scripts for the variables:
{{{
olderthan: {add_start:{now}}-{math_start}{olderthan_days}*86400000{math_end}{add_end}
newerthan: {add_start:{now}}-{math_start}{newerthan_days}*86400000{math_end}{add_end}
}}}
The add_start and math_start [CrushTask Functions] are basically multiplying the days entered manually and extracting from the current time - the {now} variable -, both are in epoch time.
The __Find__ task doesn't require significant adjustment but the Depth of the folder structure has to be considered and the task configured accordingly.
__Jump__ tasks IMPORTANT: In both Jump tasks the "Make Jump act like if/else scenario passing all items" option must be set to off.
The first Jump checks if the modified date and time of the item is Greater Than Or Equals to {newerthan} variable's value (which in our case was 10 days). If the condition is True, it continues to the second Jump task. If False, ends the job.
[attachments|find_interval3.png]
The second Jump task verifies if the modified date and time of the item is Less Than or Equals to the value of {olderthan} variable, 5 days. If the condition is True, the job continues with the Copy task. If False, ends the job.
[attachments|find_interval4.png]
Version Date Modified Size Author Changes ... Change note
12 19-May-2023 13:13 1.88 kB Sandor to previous
11 19-May-2023 13:12 1.952 kB Sandor to previous | to last
10 19-May-2023 13:08 1.947 kB Sandor to previous | to last
9 19-May-2023 13:03 1.907 kB Sandor to previous | to last
8 19-May-2023 12:54 1.915 kB Sanci to previous | to last
7 19-May-2023 11:43 1.367 kB Sanci to previous | to last
6 19-May-2023 11:41 1.365 kB Sanci to previous | to last
5 19-May-2023 11:34 1.104 kB Sanci to previous | to last
4 19-May-2023 11:24 0.62 kB Sanci to previous | to last
3 19-May-2023 11:21 0.583 kB Sanci to previous | to last
2 19-May-2023 11:18 0.308 kB Sanci to previous | to last
1 19-May-2023 11:15 0.276 kB Sanci to last
« This page (revision-12) was last changed on 19-May-2023 13:13 by Sandor
G’day (anonymous guest)
CrushFTP10 | What's New

Referenced by
CrushTask

JSPWiki