How can I scheduled Bot on Orchestrator to run every other Wednesday ?
Urgent .
thanks in advanced
How can I scheduled Bot on Orchestrator to run every other Wednesday ?
Urgent .
thanks in advanced
Hi @PALKUMARI_PATEL and @Anil_G,
I think this is not achievable in Quartz cron expressions.
You will probably need to split it to three expressions.
0 0 0 ? * 4#1 *
At 00:00:00am, on the 1nd Wednesday of the month, every month
0 0 0 ? * 4#3 *
At 00:00:00am, on the 3rd Wednesday of the month, every month
If there is a fifth week
0 0 0 ? * 4#5 *
At 00:00:00am, on the 5rd Wednesday of the month, every month
4/2 means Thursday and wait for 2 more days. Process will start again on Friday.
Thanks for the update…
But even splitting will not help is what I believe…because if we have a 5th one then the next monthw e have to skip 1st and run on the 2nd wednesday instead
You can try this in bot itself…by storing the last run date in asset and then check it and run accordingly…you can schedule the bot to run on every wednesday…and in bot check if it is alternate wednesday or not
Cheers
That is a valid point.
So, How can i get every other wednesday ? Can you please help ?
Hi @jeevith Thanks but This is not the output I want . Can you please help me to get every other wednesday ?
Hi @PALKUMARI_PATEL, you can try this. I’ve used the same logic in one of my processes and it works for me.
Can you provide sample example ? I am still confused how can i use in bot ?
Hi,
These are the things you can do in code and as @Anil_G mentioned, you can schedule the bot to run on every Wednesday. As the code does the check whether it has to process or skip on the day it is triggered, you will achieve the scenario you want.
Add an asset say lastrundate and initlaly intialize it will any date MM/dd/yyyy(eg:08/02/2023)
So you will schedule your bot on every wednesday and in the initialization state get the lastrundate asset value and say it is in lastdate…
Now use a if condition and check datediff(dateinterval.day,Now,cdate(lastdate)) > 10
I gave 10 because bot runs only on wednesdays so difference for first time will be 7 and second tiem is 14 but just to bw sure gave 10 because depending on time it might be 13 as well
In the then side you can run the bot…and also set the asset value to Now.ToString(“MM/dd/yyyy”) so that the next run will check from todays date again…
On the ese side the bot should not run and should not update the asset as well
Hope this is clear
Cheers
Thank you but it will be great if you can share sample scenario using every 15 days to execute process.
Hi @Anil_G I understand your flow but it would be great if you can provide sample file . Thank you in advanced.
@Vamsi_Krishna_Gogineni Thanks for the explanation. Can you help me how Can I store the Last execution date in the asset ? Would you mind to provide Sample Flow ?
Thank You in Advanced.
Hi @Anil_G This is giving values in negatives. If my date is 4 days ago then giving me -4 and >10 results comes as Yes. So, what can i do here ?
Thanks
Please interchange now and cdate in the expression…
And I believe it would give false and not true
Cheers
Will try that. I actually tried with “Math.Abs(CDbl(Innterval_Days.ToString)) > 10” this and this is working.
Can you help me with below issue ? I am writing SQL Data direct into sharepoint location using find folder . But gives me below error.
Write Range Error : -
Write Range: Code: AccessDenied
Message: Could not obtain a WAC access token.
Inner error:
AdditionalData:
date: 2023-05-10T17:57:33
request-id: e23e50d9-5c1c-45c2-85c9-a1510d3c6787
client-request-id: e23e50d9-5c1c-45c2-85c9-a1510d3c6787
ClientRequestId: e23e50d9-5c1c-45c2-85c9-a1510d3c6787
I am trying to write the data into Sharepoint folder .
I got the folder name by find files and folder activity.
Now I gave that folder activity result in Write range but then it give me above error.
How can i write data by creating new file on Sharepoint folder ?
First use create workbook activity to create it in required folder
https://docs-staging.uipath.com/activities/other/latest/productivity/office365-create-workbook
Then use write range with the workbook as query not the folder
Write range meeds a file item not folder
Hope this helps…
Please close if resolved …
Cheers