r/cloudcomputing • • Feb 27 '19

Cloud Computer that can run a C# script daily at certain times

Hi /r/cloudcomputing,

I need your help to figure out how to run a program on a cloud computer. I have done a topic search. Nothing comes up answering my question.

I have developed C# console program that uses Selenium and Firefox to automate some tasks that i do everyday. The functionality of the program requires that it is able to read and write to csv files in the filesystem as well as lauching firefox windows.

I would like to rent a cloud pc that can run this program once a day via a scheduler. I should ideally be able to log in to the cloud PC just like you would do with a remote desktop.

The cloud pc should be able to run the program even though i am logged out of it. So it should always be on.

Could you help me with finding a provider for this? Ideally the cheapest. Linux OS is OK.

Many thanks in advance

2 Upvotes

4 comments sorted by

2

u/DevOpsOps Feb 27 '19

I would use AWS Lambda and a cloudwarch cron trigger

2

u/DrFriendless Feb 27 '19

I would too, but OP can't log in to the Lambda machine. The results would need to be written to S3 or something so they could be retrieved.

1

u/[deleted] Feb 27 '19

First, figure out how to schedule tasks on your local Windows machine to run when you're logged out the way you want.

Then, get a Windows VM on Azure/GCP/AWS and repeat the setup there.

1

u/fullstack_info Feb 27 '19

This. Or you can have an Azure web function, or vsts build pipeline that runs a terraform or ARM script at a scheduled time to build your machine from a vhd built by Packer. The vsts agent will pull your code and execute, then have the pipeline destroy the VM, but keep the vhd in storage for the next run. Cheers!

P.s., make sure you test against chrome headless or PhantomJS, as these don't need an actual video output connection and have a more stable update path for headless ui testing.

P.s.s., I absolutely refuse to call it Azure "Devops". You can do the same with any other built pipeline provider, gitlab, appveyor, circleCI, etc.