0

I need some help with python, django & an Windows Azure VM.

I have some python scripts on a Windows Server 2012 R2 VM hosted on azure that are supposed to run daily at 5am (I currently run them manually via RDP). These scripts query a web API, then receive JSON which they parse and insert into various MYSQL tables.

I would like to configure the Windows VM to run these python scripts daily at 5am (like a unix cron job) with arguments sourced from one of the MYSQL tables. These said arguments are used in querying the web API.

How do I automate the scripts such that I must not log into the VM via RDP to run them?

Also, I'd like to access the underlying database via django and use the same django web app to run the said repetitive scripts on demand (plus supply the arguments through the Django web app), monitor the progress of the native python scripts and log errors, as well as control the system in entirety, edit the data on the database, etc. The Django web app will be hosted on the VM's local server. I'd like to be able to access this Django web app (using a domain/IP address) like we do normal websites hosted on cpanel Please advise me on how to go about this...

Thanks...

MusH
  • 75
  • 1
  • 9

1 Answers1

0

How do I automate the scripts such that I must not log into the VM via RDP to run them?

Yes, it is possible. On Windows, you could schedule a task. The schedule will be executed automation. More information about this please refer to this question on SO and this link on Technet.

Shui shengbao
  • 17,120
  • 2
  • 21
  • 40