Vertx.io Scheduling Tasks2019 Community Moderator ElectionJava library class to handle scheduled execution of “callbacks”?Schedule method invocation C#Oracle scheduled tasks?Scheduling a time in the future to send an email in Java or PythonScheduling a dynamic asp.net function?What's the easiest way to schedule a function to run at a specific time using C#Java enterprise architecture for delegating tasks between applicationsEmail Scheduler in C# using WCFIstio request tracing for vert.x event bus messagesVertx Websocket: Load Balancing
How to get the n-th line after a grepped one?
Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?
This word with a lot of past tenses
Have the tides ever turned twice on any open problem?
How to explain that I do not want to visit a country due to personal safety concern?
Is a party consisting of only a bard, a cleric, and a warlock functional long-term?
ERC721: How to get the owned tokens of an address
Why is a white electrical wire connected to 2 black wires?
Bacteria contamination inside a thermos bottle
The German vowel “a” changes to the English “i”
Instead of a Universal Basic Income program, why not implement a "Universal Basic Needs" program?
Happy pi day, everyone!
Simplify an interface for flexibly applying rules to periods of time
About the actual radiative impact of greenhouse gas emission over time
Examples of transfinite towers
Different outputs for `w`, `who`, `whoami` and `id`
What is the adequate fee for a reveal operation?
How difficult is it to simply disable/disengage the MCAS on Boeing 737 Max 8 & 9 Aircraft?
I am confused as to how the inverse of a certain function is found.
Bach's Toccata and Fugue in D minor breaks the "no parallel octaves" rule?
How do you talk to someone whose loved one is dying?
Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible
How to terminate ping <dest> &
Is it good practice to use Linear Least-Squares with SMA?
Vertx.io Scheduling Tasks
2019 Community Moderator ElectionJava library class to handle scheduled execution of “callbacks”?Schedule method invocation C#Oracle scheduled tasks?Scheduling a time in the future to send an email in Java or PythonScheduling a dynamic asp.net function?What's the easiest way to schedule a function to run at a specific time using C#Java enterprise architecture for delegating tasks between applicationsEmail Scheduler in C# using WCFIstio request tracing for vert.x event bus messagesVertx Websocket: Load Balancing
There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.
I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.
I already have already written vertx service that communicates with the db and another service that communicates with the external API.
I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.
My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.
So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?
java scheduling vert.x
add a comment |
There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.
I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.
I already have already written vertx service that communicates with the db and another service that communicates with the external API.
I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.
My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.
So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?
java scheduling vert.x
add a comment |
There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.
I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.
I already have already written vertx service that communicates with the db and another service that communicates with the external API.
I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.
My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.
So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?
java scheduling vert.x
There is a system at a company I just started working for. The system allows clients to manage their subscriber notifications via SMS. Users log in via a web application and create messages (each message has a send date_time, destination phone_number etc). These messages are saved in a mysql database. They also have a java application implemented using jsvc. This application keeps reading the database 24/7 every 1 minute and sending the messages (via an external network provider API), that is for very message that should be sent at that particular time.
I've been brought in to rewrite the whole thing. Currently I can't change anything that deals with the web application and the database. I'm only trying to rewrite the jsvc using vertx.
I already have already written vertx service that communicates with the db and another service that communicates with the external API.
I have thought of creating a periodic function that runs every hour (it reads the database and gets all the messages that should be sent within the next one hour) and then schedules this messages to be sent to the service that communicates with external API.
My question is, how would I achieve such scheduling? The send date_time of each message is precise to the minute in the database. I'm looking at Chime and how to incorporate it but I haven't seen a good example to help me know the proper way to do it.
So, what is the proper way to use Chime to schedule eventbus messages to the external API service and is there another way I can structure this use case?
java scheduling vert.x
java scheduling vert.x
asked Mar 7 at 15:36
ObbyObby
388
388
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Vert.x provides you with setPeriodic()
for that.
You can run a job every hour with something like:
vertx.setPeriodic(1000 * 60 * 60, (l) ->
// Your code here
);
I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour
– Obby
Mar 9 at 10:10
Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.
– Alexey Soshin
Mar 9 at 10:20
I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes
– Obby
Mar 9 at 11:19
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047547%2fvertx-io-scheduling-tasks%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Vert.x provides you with setPeriodic()
for that.
You can run a job every hour with something like:
vertx.setPeriodic(1000 * 60 * 60, (l) ->
// Your code here
);
I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour
– Obby
Mar 9 at 10:10
Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.
– Alexey Soshin
Mar 9 at 10:20
I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes
– Obby
Mar 9 at 11:19
add a comment |
Vert.x provides you with setPeriodic()
for that.
You can run a job every hour with something like:
vertx.setPeriodic(1000 * 60 * 60, (l) ->
// Your code here
);
I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour
– Obby
Mar 9 at 10:10
Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.
– Alexey Soshin
Mar 9 at 10:20
I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes
– Obby
Mar 9 at 11:19
add a comment |
Vert.x provides you with setPeriodic()
for that.
You can run a job every hour with something like:
vertx.setPeriodic(1000 * 60 * 60, (l) ->
// Your code here
);
Vert.x provides you with setPeriodic()
for that.
You can run a job every hour with something like:
vertx.setPeriodic(1000 * 60 * 60, (l) ->
// Your code here
);
answered Mar 8 at 9:43
Alexey SoshinAlexey Soshin
7,2881614
7,2881614
I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour
– Obby
Mar 9 at 10:10
Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.
– Alexey Soshin
Mar 9 at 10:20
I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes
– Obby
Mar 9 at 11:19
add a comment |
I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour
– Obby
Mar 9 at 10:10
Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.
– Alexey Soshin
Mar 9 at 10:20
I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes
– Obby
Mar 9 at 11:19
I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour
– Obby
Mar 9 at 10:10
I'm actually using this. The problem is, when it runs, it will select all messages to be sent within the next hour from the database, remember all this messages may have different minute setting. let's say the periodic runs at 10 am, Selects all messages to be sent between 10am and 11am. Some messages may be sent immediately at 10am, others at 10.15, 10.20, 10.30, 10.45 e.t.c. Those are the ones I need to schedule within the hour
– Obby
Mar 9 at 10:10
Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.
– Alexey Soshin
Mar 9 at 10:20
Your period should be the minimum amount of time between messages. If you can specify something like 10:17, run this task every minute and check. If you can only specify 5ths of minutes, run this job every 5 minutes.
– Alexey Soshin
Mar 9 at 10:20
I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes
– Obby
Mar 9 at 11:19
I really wanted to avoid running it every minute because not every minute will have a message. I'm currently looking at vertx-cron, will see how it goes
– Obby
Mar 9 at 11:19
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047547%2fvertx-io-scheduling-tasks%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown