Command line API with CRON

Hi,

I want use cron with api command line, but i cant find documentation for this.

Can you help me ?

Thanks

Status: 
Active

Comments

Howdy -- are you asking how to call the command line API from within Cron?

To do that, you'd first build a command that you want to run. Then, you can go into Webmin -> System -> Scheduled Cron Jobs, and click "Add a new cron job".

You can then add a Virtualmin command line API command there.

thanks for your reply :)

I wan't only use virtualmin api command line for add or del cron job, it is possible ? i use this api to make panel into an existing website with php, but the API documentation doesn't mention the cronjobs

Thanks

Unfortunately, at the moment the Virtualmin command line tools don't contain a means of automatically scheduling cron jobs.

If you're creating a script of some kind -- you could always have that script append a cron entry to your user's crontab file in "/var/spool/cron/crontabs/$USERNAME".

Or if you do it by hand from the command line, you could always run "crontab -u $USERNAME -e", and manually add the entry you want run from cron.