Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
2082 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have a process that sends files to a separate system in bulk and I want to spr
ryanh
over 10 years ago
I have a process that sends files to a separate system in bulk and I want to spread the file sending out over time so as not to overload the receiving system (# of connections). I am using a timer when the user finishes their process to schedule the sending at a later time. I'm upgrading the logic to move the time from midnight (the day after the user finishes their work, based on business needs) to between 4-5:30am on that same day.
=rule!ART_GetDateTimeMidnightOfGivenDateAndNumDays(ri!dateTime,2) + 0.1667 + (0.06*rand())
Question: Is there a simple way to get a timer to run on increments less than 1 minute? Right now with 100 or so transactions occurring over the 90 minute window there is a chance the rand() function will allow a few to occur the same minute. I'd like the timer to work at say 4:35:23 and 4:35:47, so that they are less likely to step on each other.
Can the timer or clock in Appian work at the second level?...
OriginalPostID-132720
OriginalPostID-132720
Discussion posts and replies are publicly visible
0
Chris
over 10 years ago
I'm not sure if the timers realize milliseconds since we can't review anyhting less than seconds in the details - but the time/datetime functions accept millisecond inputs at least..
=milli(time(4,23,35,rand()*60))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 10 years ago
Why not build something like a queue. Each upload job is a process. Another process "queue worker" uses a portal report to find the oldest of these jobs and sends a message to this process so that this is completing the upload. As the upload finished a message is returned and the "queue worker" triggers the next job. The queue worker could be started at a specific time and run until all jobs are done.
I have something similar running to ensure that messages to a process are received in order under any conditions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ryanh
over 10 years ago
I'll have to give the seconds part a shot again, since my test outputs didn't show seconds I assumed the timer was ignoring them. I am contemplating a rewrite to work on a queue system as you suggested. This would be a better long term way to go. Short term I was hoping to use the existing timer solution and throw in a quick rand() function to spread the attempts out over 1-2 hours since this is happening in the middle of the night and isn't time critical. I have the rand() working in test now and it was a quick fix.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rogerp63
Certified Senior Developer
over 10 years ago
In the Timer setup, enter a decimal within the expression editor. It will then read the time in fractions of a minute.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nageswararaoa
over 10 years ago
If you want to set the time at 10(hour):30(minutes):30(seconds),
you can give like this :=datetime(year(now()),month(now()),day(now()),10,30,30).
You need to set the above expression at "Delay until the date and time specified by this expression".
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel