How do I use a virtual machine? I have created a droplet and now I want to code in python and have the machine run on its own. Lets say at 12pm everyday I want it run a function and save the result to my local hard drive, how do I do this?

Thanks.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi, you’ve described a common use case for cron, a common facility on unix/linux. Here’s a tutorial on setting up cron, including how to set the time and save the result to a hard drive - either as a new file or appending an existing file:

How To Use Cron To Automate Tasks On a VPS

More handy info and a crontab generator app here, too:
https://crontab.guru/#0_12_*_*_*

That’s the link for an example crontab setting that will execute every day at 12:00 server time.

Hope this helps - let us know if you have any more questions.

Submit an Answer