Virtual machine to ...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Virtual machine to automate scheduled tasks??

8 Posts
8 Users
0 Reactions
56 Views
Posts: 2052
Full Member
Topic starter
 

Hello,

Products that I work with are ncreasingly being driven by API's so I have been (trying) to learn Python, cURL etc.

I have now reached the stage where I have a library of basic scripts and am comfortable using them for basic tasks but now want the facility to automate and schedule their running.

Examples include taking backups of config files (small XML or text based), automating LDAP synchronisation etc.

These tasks would happen on customer sites so my initial thought is to create some sort of virtual machine for this purpose.

I am wondering what the best approach is here. Is there a simple, off the shelf product or is it a case of creating something myself? - I work mainly in Windows but realise that Linux may be the best option here. My concerns about using Linux would be maintaining the security of the system especially if it is audited somehow.

Would I be better off just getting a Windows server from the customer and using that?

Thanks


 
Posted : 11/06/2018 11:38 am
Posts: 901
Full Member
 

If they've already got standard patching routines for their windows estate, I'd be tempted to stick to Windows so you can potentially hand that element over to them and be more confident that it'll get patched in good time.  Linux boxes, especially appliances, tend to get left alone on the erroneous assumption they don't need updates / fixing unless broken.


 
Posted : 11/06/2018 11:46 am
Posts: 8672
Full Member
 

I would have thought it depends on what infrastructure the customer already has? If VMware you could create either a Windows or Linux OVA appliance but who would be responsible for deploying/configuring/securing/maintaining it? If you then go with the OS you're comfortable with but also needs to fit in with customer's current environment (and licensing).


 
Posted : 11/06/2018 11:55 am
 nerd
Posts: 439
Free Member
 

You could have a look at Docker containers to do this.

Less overhead than a VM, but accessing the file system might be more difficult.


 
Posted : 11/06/2018 11:57 am
Posts: 4324
Full Member
 

Not sure what the VM will add? How will you ensure it's running?

Windows has a built in Task Scheduler so just create bat files for your jobs and schedule them on a machine that will stay up e.g. the app server. If you want to use Linux, CRON is your friend.


 
Posted : 11/06/2018 12:00 pm
Posts: 3735
Free Member
 

Just learn powershell so you can automate the creation of the scheduled tasks in windows 😉


 
Posted : 11/06/2018 12:04 pm
Posts: 2052
Full Member
Topic starter
 

Thanks all. My career (post Novell Netware) has mainly been spent avoiding Microsoft but it does look like Windows/Powershell may be the best fit for most of my customers.

Shame because I far prefer coding in Python.

Will check out containers too - this has been a grey area for me so time to learn about them I guess.


 
Posted : 11/06/2018 2:22 pm
Posts: 5
Free Member
 

We use https://airflow.apache.org/ for quite a lot of this type of stuff.


 
Posted : 11/06/2018 3:49 pm
Posts: 4954
Free Member
 

Code in python just use powershell / bash to run the python scripts. To avoid installing python you can use a python to exe tool then just schedule your program to run.


 
Posted : 11/06/2018 4:09 pm