I am managing a web hosting environment through Virtualmin for a content creator client who regularly needs original quality media retrieved from their own public Instagram posts and stored automatically on their virtual server. The manual workflow currently involves using Snapinsta to retrieve the original quality file from the public post URL through a browser and then uploading it to the server via FTP. I want to automate this process by setting up a cron job through Virtualmin that runs a shell script to fetch the media URL and save it directly to a designated folder on the virtual server. Has anyone set up a similar automated media retrieval workflow through Virtualmin cron jobs and found a reliable approach for handling the file download and storage step without manual intervention.
This isn’t a Virtualmin question. cron is a system feature, the same anywhere.
cron runs shell commands, so you need to come up with a shell command that does what you want.
I see no obvious way to make a request with, e.g. curl or wget to snapinsta, which is what you’d need to do. The UI doesn’t use query parameters, so it must be a POST request with some sort of request object or something.
This JavaScript library seems to know how to download from SnapInsta without going through the UI, so maybe that’s a useful path, either for understanding what you need to do in a curl POST request or maybe you want to try using this directly (i.e. make a JavaScript app that runs with nodejs that you call via cron): snapinsta/README.md at main · Jumpathy/snapinsta · GitHub