Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


jrtwynam
2018-10-23T16:06:10Z
Hi,

I'm trying to create a task that'll monitor a particular folder in my team's group mailbox and delete any message older than 14 days. I'm using an IMAP connection, which I've verified does work (it's in use on another job with an email trigger). The only criteria I've put in the delete message task is in the Conditions section of the Email-Delete Messages tab. I have Received Date set to "Smaller than (<) {DATENOWADD(Days|-30|)}", with all the other areas of that tab set to "don't check". I've tried other date formats within that, such as {DATENOWADD(Days|-30|yyyyMMdd)} and {DATENOWADD(Days|-30|Mmm dd, yyyy)}, but nothing makes a difference. The task executes successfully, but claims that there were no messages to delete, which is not true - there's somewhere around 3500 messages that should match that criteria.

Any ideas?

Thanks.
Sponsor
Forum information
Support
2018-10-24T15:52:46Z
Please add a screenshot of settings.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jrtwynam
Support
2018-10-24T17:40:55Z
What if you update to using this Variable: {DATENOWADD(Days|-45|yyyy-MM-dd)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jrtwynam
2018-10-24T18:03:18Z
I just tried that, but it still said it found no messages to delete.

During my testing, I had tried just putting in a "Email - Get Messages" task using the same variable and giving it a specific folder (i.e. not the Inbox). That one actually did get some messages, but it was weird. It's set exactly the same way as the delete one that I've already posted screenshots of, except the conditions have Received Date Larger Than {DATENOWADD(Minutes,60,T)}. So to me, that should retrieve all messages in the "Automatically Filed/Transline CICO" folder that were received 60 minutes from now, which obviously means it should retrieve nothing because VC can't see into the future. What it actually retrieved was all messages from the inbox that were received at any point today.

Knowing that for whatever reason the Get Messages task wasn't reading the folder I told it to read, I thought maybe the Delete Messages task was also having the same issue. There are no messages in the inbox that are 45 days old - the oldest is about 28 or 29 days old. So I changed the date variable to {DATENOWADD(Days|-25|yyyy-MM-dd)} (which at this point would be Sept 29). This should have picked up all emails on or before Sept 29, which would be somewhere around 50 emails dating back to Sept 22. It still said it found no emails.
jrtwynam
2018-10-25T14:44:04Z
I managed to find a date condition that works:

Date Condition Works.jpg

That seems to successfully find all emails in the Inbox that were received within the past 20 days. However, this one doesn't work:

Date Condition Doesn't Work.jpg

The only difference between the two is that one uses Larger Than and the other uses Smaller Than. Of course, the task still has the problem of not referencing the specified folder:

Folder Setting.jpg
Support
2018-10-25T15:01:45Z
Ok, thanks, we will pass this to developers for verification and testing.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jrtwynam
2018-10-25T15:11:16Z
I turned on extended debug logging, and this is what showed up when I used the "Smaller Than" date condition:


10/25/2018 10:49:58 AM	Info	Job started: Clean Transline CICO folder (keep messages within the past 14 days)
10/25/2018 10:49:58 AM	Info	User 'VisualCron Default Admin' - Ran Job: Clean Transline CICO folder (keep messages within the past 14 days)
10/25/2018 10:49:58 AM	Debug	SendJobStats->Ended (10/25/2018 10:49:58 AM)
10/25/2018 10:49:58 AM	Debug	Next action: ActionContinue
10/25/2018 10:49:58 AM	Debug	Calling GetNextTaskProcess()
10/25/2018 10:49:58 AM	Debug	Next Task is: Email - Get messages
10/25/2018 10:49:58 AM	Debug	Next action: ActionContinue
10/25/2018 10:49:58 AM	Debug	Calling StartTaskProcess() with Task: Email - Get messages (7780583)
10/25/2018 10:49:58 AM	Info	Task started(Email - Get messages): Email - Get messages (7780583)
10/25/2018 10:49:59 AM	Err	EMailGetMessages: Folder not found
10/25/2018 10:49:59 AM	Err	EMailGetMessages: No Certificate was found)
10/25/2018 10:49:59 AM	Info	Task completed (Success)->'Email - Get messages' (7780583)
10/25/2018 10:49:59 AM	Debug	PrevTaskProcess(Email - Get messages)->ExitCodeResult: Success (ECCId: 746c95ce-d394-491c-925c-8bd50e4daa8ePId: 7780583, Exit code: 0)
10/25/2018 10:49:59 AM	Debug	Found 1 matching flows. (7780583)
10/25/2018 10:49:59 AM	Debug	Calling GetNextTaskProcess()
10/25/2018 10:49:59 AM	Debug	Next execution (2) for Job 'Clean Transline CICO folder (keep messages within the past 14 days)' is: 5:00:00 AM
10/25/2018 10:49:59 AM	Debug	SendJobStats->Ended (10/25/2018 10:49:58 AM)
10/25/2018 10:49:59 AM	Info	Job completed (Success)->'Clean Transline CICO folder (keep messages within the past 14 days)'


It's interesting that it says "folder not found". I didn't type in the folder name, I selected it from the folder list pop-up window that's available on IMAP connections, so the connection should be able to see the folder. Still, with the "smaller than" condition, it returns 0 messages, which actually makes sense if it can't find the folder. But with the "larger than" condition, it also says it can't find the folder, yet for that one it apparently decides to default to the inbox.
Support
2018-10-31T11:55:09Z
jrtwynam
2018-10-31T11:59:47Z
Downloading it now. I've never done an upgrade before though - can I just install it over top of the existing one? Or do I have to back up all my tasks and settings, uninstall, and then install the new one?
thomas
2018-10-31T12:28:09Z
Always do a backup before upgrading. Then install on top. No need to uninstall

jrtwynam
2018-10-31T15:52:45Z
Backing up is always a good idea, and the reality is that I would do that even if someone had said that it's not necessary, because I'm a bit paranoid about stuff like that. Good to know that I can install overtop of the existing install, but there is one thing that concerns me about that. My guess is that at some point during the install, it will have to stop the VC service and restart it. My user account (the one that I'd be logged in as when doing the install) doesn't have access to stop and start a service. That's something that I'm working with our IT department to rectify, but what happens if it tries to stop the service and fails because of the lack of access? My concern is that the install would fail overall and mess up whatever we already have working.

It's possible that this concern is completely unfounded, and it's just because I've never upgraded before.
Support
2018-11-01T09:21:59Z
Originally Posted by: jrtwynam 

Backing up is always a good idea, and the reality is that I would do that even if someone had said that it's not necessary, because I'm a bit paranoid about stuff like that. Good to know that I can install overtop of the existing install, but there is one thing that concerns me about that. My guess is that at some point during the install, it will have to stop the VC service and restart it. My user account (the one that I'd be logged in as when doing the install) doesn't have access to stop and start a service. That's something that I'm working with our IT department to rectify, but what happens if it tries to stop the service and fails because of the lack of access? My concern is that the install would fail overall and mess up whatever we already have working.

It's possible that this concern is completely unfounded, and it's just because I've never upgraded before.



Right, the user that uninstalls need Service stop permission. The Services will be stopped and uninstalled. Then it will be a new installation but settings remain.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jrtwynam
2019-01-24T14:31:03Z
Hi,

I have not yet upgraded to the build mentioned above, mainly because I've read a couple of posts in other topics where people have said that upgrading has broken some of their jobs that had been working perfectly in a previous version. However, I did fiddle around with this job some more. What I found is that this date condition works:

"Larger Than" {DATENOWADD(Days|-2|MM/dd/yyyy)}

I made a small amount of progress with the monitored folder, but I'm not all the way there yet. If I have the folder set like this:

Automatically Filed/Transline CICO

It gives me an error saying "folder not found". That wasn't typed in, it was selected using the folder chooser dialog. However, if I set the folder to just this:

Automatically Filed

It works perfectly (with the date condition). So it's as if it's having trouble identifying a subfolder. I've tried using quotes around the folders, like this:

"Automatically Filed"/"Transline CICO"
Automatically Filed/"Transline CICO"
"Automatically Filed/Transline CICO"

But none of those made a difference.
Scroll to Top