3

I have installed webmin on my centos linux server.

I want to set a cron or list cron jobs using API which I can call through any python or php code. I tried finding any such thing on internet and in webmin documentation, but couldnt find anything.

Has anyone tried this or knows how this thing can be implemented ?

I know I can create a PHP api or python api , which in turn can run shell commands to add crontab, but I am looking native-webmin API.

kadamb
  • 1,532
  • 3
  • 29
  • 55

1 Answers1

2

https://doxfer.webmin.com/Webmin/XML-RPC_Calls documents a way to perform rpc calls. You can, for example, execute such a call using curl with

 curl --data @testcall -k https://root:changeme@192.168.0.100:10000/xmlrpc.cgi

where the content of testcall is

<?xml version="1.0"?>
 <methodCall>
 <methodName>useradmin::list_users</methodName>
 <params>
 <param>
 <value>apiUser</value>
 </param>
 <param>
 <value>apiKey</value>
 </param>
 </params>
 </methodCall>
col.panic
  • 2,944
  • 4
  • 25
  • 31