Submitted by herisson.thomas on Thu, 05/19/2011 - 01:53
Hi,
I want use cron with api command line, but i cant find documentation for this.
Can you help me ?
Thanks
Status:
Active
Hi,
I want use cron with api command line, but i cant find documentation for this.
Can you help me ?
Thanks
Comments
Submitted by andreychek on Thu, 05/19/2011 - 08:20 Comment #1
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.
Submitted by herisson.thomas on Fri, 05/20/2011 - 03:43 Comment #2
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
Submitted by andreychek on Fri, 05/20/2011 - 09:00 Comment #3
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.