running virtualmin script as a cron job

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