Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8597753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:59:03+00:00 2026-06-12T00:59:03+00:00

Requirements: Define job that has start time t , batch size s , invocation

  • 0

Requirements:

  • Define “job” that has start time t, batch size s, invocation interval i and list that should be processed
  • Starting with time t grab next s items from list every i seconds and process it
  • Job can be paused and resumed (user should be able to tell the job to stop grabbing new list items for processing)

Flask will be used for web app. Obviously, I need some background process/thread that will periodically execute processing code.

Since the state will be in persisted to database, simplest approach that I can think of is to define a cronjob that will periodically execute python script that checks for active jobs and performs the processing.

Any suggestion on how to design this using only python?

  • Start another python process that will periodically check and execute active jobs?
  • Spawn a worker thread from Flask?
  • … ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:59:05+00:00Added an answer on June 12, 2026 at 12:59 am

    I would strongly suggest that you employ a queuing mechanism like Redis or RabbitMQ. Flask would act as a producer and and your “worker” would consume and process.

    Setting either of these tools up is far less daunting that you might expect.

    sudo apt-get install redis-server
    sudo apt-get install python-pip
    sudo pip install redis
    

    Your flask app acts as a producer

    >>> from redis import Redis
    >>> r = Redis()
    >>> r.lpush('task_queue', 'task1')
    1L
    

    And your “worker” consumes and processes asynchronously:

    >>> r.rpop('task_queue')
    'task1'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My requirements are that Ads have a definite size, could be different media types
I've recently been informed that I need to define the requirements for the project
I have a generic class, on which I define a method that should take
How would you define a Quartz job, with the following requirements: It must fire
Requirements Project should contain 1 main application and some secondary sub applications (which uses
Some requirements for a mobile chat room: Should be able to work seamlessly with
Here are my requirements: I have a DIV which should display an image (JPEG).
C++0x thread library or Boost.thread define non-member variadic template function that lock all lock
I need to define a jsp tag which named include. It should be used
The R 5 RS spec states that as part of the requirements for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.