Questions tagged [periodic-task]

218 questions
2
votes
1 answer

Python periodic timer interrupt

(How) can I activate a periodic timer interrupt in Python? For example there is a main loop and a timer interrupt, which should be triggered periodically: def handler(): # do interrupt stuff def main(): init_timer_interrupt(,…
Alexander
  • 921
  • 3
  • 12
  • 31
2
votes
1 answer

Why only one periodic task created?

I want to create multiple periodic tasks by a loop, but only the last of the list was created.For example: @app.on_after_finalize.connect def setup_periodic_tasks(sender, **kwargs): a = [1,3,4,7,8,10] for i in a: …
Q.Nguyen
  • 171
  • 1
  • 8
2
votes
2 answers

Why is Celery periodic task not working? (Django)

It returns no errors, however when running celery -A mysite beat -l info & celery -A mysite worker -l info the task doesn't happen. When trying the same structure in another Django project it works fine. Help please! My code: mysite/settings.py…
2
votes
2 answers

django celery positional arguments celerybeat scheduling error

I'm having trouble getting celerybeat to schedule my function due to positional arguments. Reading the documentation, I don't understand why some functions refer to a number and some don't. I've tried to add in the args as the same as my functions…
tomoc4
  • 337
  • 2
  • 10
  • 29
2
votes
2 answers

Check when a device last time connected to the internet

I am working on an android app and I want to check if it has been more than 10 days since last time that device was connected to the internet. I have registered a Network change receiver so that I get the connectivity changes but I have no idea how…
Ioanna Dln
  • 309
  • 2
  • 13
2
votes
2 answers

How to run Celery Periodic task at every end of the month

Basically, I have a task to generate Invoice. So I have created a function generate_invoice() in my tasks.py file. Now, I am using @periodic_task to call the function. But I need my task to run only on the last date of the month around 11:55 pm -…
Shubham Srivastava
  • 1,190
  • 14
  • 28
2
votes
2 answers

Python, Raspberry pi, call a task every 10 milliseconds precisely

I'm currently trying to have a function called every 10ms to acquire data from a sensor. Basically I was triggering the callback from a gpio interrupt but I changed my sensor and the one I'm currently using doesn't have a INT pin to drive the…
Arkaik
  • 852
  • 2
  • 19
  • 39
2
votes
1 answer

using asyncio to do periodic task in django

Do you think it is possible to use asyncio to run a task every n seconds in django, so that the main process wouldn't be blocked? Something for example that would print every 5 min in console, like: import asyncio from random import…
2
votes
1 answer

AWS Alert to monitor a key is periodically createded a bucket

I'm using an AWS Lambda (hourly triggered by a Cloudwatch rule) to trigger the creation of an EMR cluster to execute a job. The EMR cluster once finished its steps write a result file in a S3 bucket. The key path is the hour of the…
Johny19
  • 5,364
  • 14
  • 61
  • 99
2
votes
1 answer

make GcmNetworkManager periodic task work even after exiting the app?

I need a periodic task that require internet connection and persists after reboots. I have achieved that much but the problem is that I want the app to continue working even adter I exit it. As in, if I exist the app and turn off wifi and then turn…
2
votes
1 answer

Django Celery Beat Periodic Tasks

I am trying to run a periodic task with django celery, and it is dynamically added by users using custom arguments. I have the following code to start the task. I only want it to run once as it takes a while for it to set up, and I have an infinite…
rishubk
  • 441
  • 2
  • 8
  • 19
2
votes
3 answers

Aws Elasticbeanstalk cron.yaml worker issue

I have an application deployed to Elasticbeanstalk and run as worker, I wanted to add a periodic task ti run each hour, so I create a cron.yaml with this conf: version: 1 cron: - name: "task1" url: "/task" schedule: "00 * * * *" But…
2
votes
1 answer

Celerybeat periodic tasks executed multiple times if stuck behind a long running task

I am using celery 3.1.17 and redis as broker version 3.0.2 in my django program. It's running on Ubuntu 14.04. In the settings, I defined the CELERYBEAT_SCHEDULE like: CELERYBEAT_SCHEDULE = { 'task1': { 'task':…
Abuu
  • 21
  • 3
2
votes
1 answer

Periodic task is not working properly in django celery

Hello friends I need your help in periodic tasks for django application. I am trying to do periodic task using celery but it is not properly working. I have a simple task, in which there is only a print statement. Celery is working only for 1st…
2
votes
1 answer

Tracking geo-location in background every 5 mins interval with Windows Phone 8

I want to get geo-location every 5 mins interval and it should run in the backgound using Windows Phone 8 SDK. I've been thinking to use a Periodic Task but it runs in 20 mins interval which is not frequent enough. I can run it more frequently by…