Run Special Tasks According To User Defined Times





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







-1















I'm surprised I haven't been able to find something on this here - so if I've just completely missed it, please direct me to the proper thread.



Before I dive into any code, I'm trying to gather some good ideas for handling this situation.



We're developing a website with a list of tasks the user can select for the server to execute on their behalf. Automated emails, text messages, calendar reminders, etc.



I first went down the road of thinking about using cron, but as that the times and tasks for each user will likely change every day throughout each day - for this to be feasibly salable, I figured involving cron directly for each task could get pretty messy and buggy.



My next thought was to run a cron script every night at midnight and generate a task-list for the next day - but I'd still need cron or some sort of cron-like timing daemon to check the list against the time every minute.



I've run through several ideas, but they all seem fairly active or processor heavy. I'd like to find a good light-weight solution that can handle up to several thousand user defined tasks per day.



I'm working with your basic LAMP7 stack. If anybody has dealt with a similar task, I'm just looking for some good ideas to consider.



Thanks in advance.










share|improve this question


















  • 2





    You can look at Message Queuing, such as RabbitMQ: rabbitmq.com

    – Chowkidar Madhur Bhaiya
    Nov 25 '18 at 8:52


















-1















I'm surprised I haven't been able to find something on this here - so if I've just completely missed it, please direct me to the proper thread.



Before I dive into any code, I'm trying to gather some good ideas for handling this situation.



We're developing a website with a list of tasks the user can select for the server to execute on their behalf. Automated emails, text messages, calendar reminders, etc.



I first went down the road of thinking about using cron, but as that the times and tasks for each user will likely change every day throughout each day - for this to be feasibly salable, I figured involving cron directly for each task could get pretty messy and buggy.



My next thought was to run a cron script every night at midnight and generate a task-list for the next day - but I'd still need cron or some sort of cron-like timing daemon to check the list against the time every minute.



I've run through several ideas, but they all seem fairly active or processor heavy. I'd like to find a good light-weight solution that can handle up to several thousand user defined tasks per day.



I'm working with your basic LAMP7 stack. If anybody has dealt with a similar task, I'm just looking for some good ideas to consider.



Thanks in advance.










share|improve this question


















  • 2





    You can look at Message Queuing, such as RabbitMQ: rabbitmq.com

    – Chowkidar Madhur Bhaiya
    Nov 25 '18 at 8:52














-1












-1








-1








I'm surprised I haven't been able to find something on this here - so if I've just completely missed it, please direct me to the proper thread.



Before I dive into any code, I'm trying to gather some good ideas for handling this situation.



We're developing a website with a list of tasks the user can select for the server to execute on their behalf. Automated emails, text messages, calendar reminders, etc.



I first went down the road of thinking about using cron, but as that the times and tasks for each user will likely change every day throughout each day - for this to be feasibly salable, I figured involving cron directly for each task could get pretty messy and buggy.



My next thought was to run a cron script every night at midnight and generate a task-list for the next day - but I'd still need cron or some sort of cron-like timing daemon to check the list against the time every minute.



I've run through several ideas, but they all seem fairly active or processor heavy. I'd like to find a good light-weight solution that can handle up to several thousand user defined tasks per day.



I'm working with your basic LAMP7 stack. If anybody has dealt with a similar task, I'm just looking for some good ideas to consider.



Thanks in advance.










share|improve this question














I'm surprised I haven't been able to find something on this here - so if I've just completely missed it, please direct me to the proper thread.



Before I dive into any code, I'm trying to gather some good ideas for handling this situation.



We're developing a website with a list of tasks the user can select for the server to execute on their behalf. Automated emails, text messages, calendar reminders, etc.



I first went down the road of thinking about using cron, but as that the times and tasks for each user will likely change every day throughout each day - for this to be feasibly salable, I figured involving cron directly for each task could get pretty messy and buggy.



My next thought was to run a cron script every night at midnight and generate a task-list for the next day - but I'd still need cron or some sort of cron-like timing daemon to check the list against the time every minute.



I've run through several ideas, but they all seem fairly active or processor heavy. I'd like to find a good light-weight solution that can handle up to several thousand user defined tasks per day.



I'm working with your basic LAMP7 stack. If anybody has dealt with a similar task, I'm just looking for some good ideas to consider.



Thanks in advance.







php mysql linux






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 '18 at 8:51









CreationTribeCreationTribe

3461412




3461412








  • 2





    You can look at Message Queuing, such as RabbitMQ: rabbitmq.com

    – Chowkidar Madhur Bhaiya
    Nov 25 '18 at 8:52














  • 2





    You can look at Message Queuing, such as RabbitMQ: rabbitmq.com

    – Chowkidar Madhur Bhaiya
    Nov 25 '18 at 8:52








2




2





You can look at Message Queuing, such as RabbitMQ: rabbitmq.com

– Chowkidar Madhur Bhaiya
Nov 25 '18 at 8:52





You can look at Message Queuing, such as RabbitMQ: rabbitmq.com

– Chowkidar Madhur Bhaiya
Nov 25 '18 at 8:52












1 Answer
1






active

oldest

votes


















1














You can use ReactPHP application run in background in your machine.



Then you can create a simple http server on your ReactPHP application for recieving the user data from your webserver such as you specified LAMP7. And once you recieved that you can trigger those events by setting asyncronous timer on the event-loop.






share|improve this answer



















  • 1





    great - thanks. I'll give both suggestions a shot and see how they work out :)

    – CreationTribe
    Nov 26 '18 at 5:59






  • 1





    And plus if you are new to async/non-blocking-IO then i'll suggest you exploring more about event-loops youtube.com/…

    – user8713979
    Nov 26 '18 at 12:27














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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465972%2frun-special-tasks-according-to-user-defined-times%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









1














You can use ReactPHP application run in background in your machine.



Then you can create a simple http server on your ReactPHP application for recieving the user data from your webserver such as you specified LAMP7. And once you recieved that you can trigger those events by setting asyncronous timer on the event-loop.






share|improve this answer



















  • 1





    great - thanks. I'll give both suggestions a shot and see how they work out :)

    – CreationTribe
    Nov 26 '18 at 5:59






  • 1





    And plus if you are new to async/non-blocking-IO then i'll suggest you exploring more about event-loops youtube.com/…

    – user8713979
    Nov 26 '18 at 12:27


















1














You can use ReactPHP application run in background in your machine.



Then you can create a simple http server on your ReactPHP application for recieving the user data from your webserver such as you specified LAMP7. And once you recieved that you can trigger those events by setting asyncronous timer on the event-loop.






share|improve this answer



















  • 1





    great - thanks. I'll give both suggestions a shot and see how they work out :)

    – CreationTribe
    Nov 26 '18 at 5:59






  • 1





    And plus if you are new to async/non-blocking-IO then i'll suggest you exploring more about event-loops youtube.com/…

    – user8713979
    Nov 26 '18 at 12:27
















1












1








1







You can use ReactPHP application run in background in your machine.



Then you can create a simple http server on your ReactPHP application for recieving the user data from your webserver such as you specified LAMP7. And once you recieved that you can trigger those events by setting asyncronous timer on the event-loop.






share|improve this answer













You can use ReactPHP application run in background in your machine.



Then you can create a simple http server on your ReactPHP application for recieving the user data from your webserver such as you specified LAMP7. And once you recieved that you can trigger those events by setting asyncronous timer on the event-loop.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 25 '18 at 13:25







user8713979















  • 1





    great - thanks. I'll give both suggestions a shot and see how they work out :)

    – CreationTribe
    Nov 26 '18 at 5:59






  • 1





    And plus if you are new to async/non-blocking-IO then i'll suggest you exploring more about event-loops youtube.com/…

    – user8713979
    Nov 26 '18 at 12:27
















  • 1





    great - thanks. I'll give both suggestions a shot and see how they work out :)

    – CreationTribe
    Nov 26 '18 at 5:59






  • 1





    And plus if you are new to async/non-blocking-IO then i'll suggest you exploring more about event-loops youtube.com/…

    – user8713979
    Nov 26 '18 at 12:27










1




1





great - thanks. I'll give both suggestions a shot and see how they work out :)

– CreationTribe
Nov 26 '18 at 5:59





great - thanks. I'll give both suggestions a shot and see how they work out :)

– CreationTribe
Nov 26 '18 at 5:59




1




1





And plus if you are new to async/non-blocking-IO then i'll suggest you exploring more about event-loops youtube.com/…

– user8713979
Nov 26 '18 at 12:27







And plus if you are new to async/non-blocking-IO then i'll suggest you exploring more about event-loops youtube.com/…

– user8713979
Nov 26 '18 at 12:27






















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465972%2frun-special-tasks-according-to-user-defined-times%23new-answer', 'question_page');
}
);

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







這個網誌中的熱門文章

Hercules Kyvelos

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud