How do I run a script every day at 00:00 hrs to hit an django API on Ubuntu machine?

panchu.prodhan

I need information about how to hit a django API running on ec2 on every night 00:00 hours.

Thanks in advance.

Horatiu Jeflea

You can use crontab to schedule running a bash file every midnight. The bash file will use curl to do a Django API call (or you can use anything else).

crontab -e
0 0 * * * /bin/sh django_api_call.sh

django_api_call.sh

#!/bin/sh

curl http://www.django-app.com

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

In Java how do I convert from seconds since epoch to milliseconds since January 1, 1970, 00:00:00 GMT

Java Get time duration between 00:00:00 HRS and Now

How do I parse "Nov 20, 2016 12:00:00 AM" to LocalDateTime?

How can I set the default value of a field as '0000-00-00 00:00:00'?

How do I run a script for 1st working day of every month in cron?

How can I run a code between 9:00 AM to 10:00 AM using Javascript?

How do I get today's UTC date/time for 00:00:00 in JavaScript?

How can I use datetime.strptime on a string in the format '0000-00-00T00:00:00+00:00'?

Python script schedule to run on day 1 of each month at 2:00 am

How do I make my Discord bot run a function every sunday at 0:00?

How do I configure Ubuntu to reboot every day at a given time?

How do I setup two cron jobs to run every night at 3:00 and 3:10?

How do I run multiple Ubuntu versions on a single machine?

How to create a windows service that runs every day at 10:00 AM and 10:00 PM

How can I set a datetime after 4:00 or on weekend to 8:00am the next business day?

How do I run a script every time "yum update" is run?

How can I get a script to run every day on Mac OS X?

How do I run this bash script in ubuntu?

Run script every 4 minutes but don't run from 3:00 to 3:40

How to pop up a dialog box at 8pm (20:00 hours) every day using java?

how do i run a Script inside django?

How do I run a python script at specific time in a day automatically?

How do I convert an API UTC time to local time (+13:00)

how can I strip the 00:00:00 from a date in python

How can i schedule a job between 04:00 and 21:00 on every 5 minutes with Azure Web Job

How do I format dates as yyyy-mm-ddT00:00:00.0000000Z in R?

How do I split time periods by 5 minute breaks (00:00, 00:05, 00:10, ...)?

How do I format this string '8:00-9:00 AM' to a valid ISO time format?

Split the dates which is rolling past 00:00 hrs into two rows