I need to create a web service that executes every hour.  It will be used to review data in a database and add alerts to a table in the same database if certain conditions are met/not met.    What we currently have is:We have end devices that use Python to report to an Amazon Web Services (AWS) virtual server.  The AWS server takes that information and stores it in a MySQL database.  The AWS server is Linux running Django and Apache.  I need to be able to have some python code run every hour that verifies the data that has been stored by the end devices.  If certain conditions are not met then a record will be added to the alerts table in the database.We originally contracted to have the above setup created.  I am new to Python, Django, and Apache.  However, I have already made several changes to the Python code that sends and also receives the data from the end devices.  I am a coder that is breaking into web programming.Does anyone have any recommendations on how I can do this?
Execute code every hour
python;web services;django;apache
How about making a cronjob, assuming you have shell access?The cron daemon exists on virtually any UNIX-like system and schedules commands to run based on a description in a file called the crontab.Each line of the file contains a set of fields to indicate the timepoints when a command shall be executed.Your task could be either a standalone program that does the task you wish to accomplish or as another answer suggests, an invocation of a HTTP client like wget, curl or fetch to access a web resource that will perform the action.If you've got limits for how long a request may take to serve, you might have to move the task into an offline script or program that doesn't run inside your web framework/server.