What I’m seeing is: I would like to copy the contents of htdocs from my free website optiontracker.epizy.com to my prod domain htdocs (listed above). They are both on the same account so using a ftp and an external script I could code it up, but I thought it would be nice to use cron and php. However, I believe php can only reach the htdocs of the current site its running under, even if they are technically the same account.
I’m using this software: This would be php and cron
You could call PHP through Cron and use FTP from the PHP code to upload the files to the other directory over FTP.
Can it be done? Probably. Should you? Probably not. The cron implementation is a bit… basic and script execution limits are going to make this very hard. Running a shell script somewhere else is probably easier.
I found a pretty cool project sibbl / Bitbucket FTP deployment / wiki / Home — Bitbucket to use a webhook on push to git, but the only issue is that its working with bitbucket 1.0 api. If I have time ill port it to their api 2.0 but I was really just looking for a quick and dirty deploy from test to prod on some trigger either nightly or on check in or something. I think I can still stay under that limit if I only upload the files that have changed.