0

I have data coming from an API in JSON format which I then run a few functions/transformations in python and then insert the data in to an SQL database through pandas & SQLalchemy.

Now, how do I automatically do this at the end of every day, without having to open up the script and run it manually?

1
  • Supposing this script runs on a server, what about using a crontab? i.e. put the script to run daily at 23:00hrs (0 23 * * *) Commented Jun 29, 2020 at 21:45

1 Answer 1

1

You can use crontab on a server (or your Linux/Mac laptop but it will not run the script if its turned off of course).

You can run crontab -e to edit the crontab file. Add something like the following to run your script everyday at 11 PM:

0 23 * * * ~/myscript.py

crontab guru is a useful resource to try different schedule expressions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.