These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for running virtualmin script as a cron job on the new forum.
Hi,
I have a cron job set up to restore a demo website to its original condition on a nightly basis.
I have used the Webmin:Scheduled cron jobs page to set this up.
The command I am using is:
virtualmin restore-domain --source /home/autorestore/mydomain.tar.gz --domain mydomain.com --all-features
This works fine when I select "Run now" from the webmin scheduled cron jobs interface, but at the actual time of processing via cron it fails and the email I am sent with the failure note says:
/bin/sh: virtualmin: command not found
I guess I need to prefix the command with something but I don't know what...
TIA
Found the answer myself - If anyone else is interested, the correct syntax is /usr/sbin/virtualmin