Provisioning - New crontab fort virtual servers

Good day,

I’ve two server with webmin/virtualmin installed, since few months, when I create a virtual server with AwStats plugin enabled, the creation script add an entry in my crontab for the statistics updates.
I need to create another entry for the sitemap building, but i’ve not found any place in the Webmin/Virtualmin interface useful to to this feature, are there guys able to give me an hint?

Many thanks :slight_smile:


You can add Cron entries using Webmin -> System -> Scheduled Cron Jobs.

Also, if you log into Virtualmin as a user, I believe that same thing is available in the “Webmin Modules” section on the left of Virtualmin.


Dear Eric,

you are right, and actually I’ve used this way to execute the task, but if the Virtualmin/AwStats module it’s able to create an automatic entry, I suppose there will be a way to configure Virtualmin in order to do another entry during the Virtual Server creation.

Many thanks

Oh I see, so you’re looking for an automated way to do that during Virtual Server creation.


I’d probably look into running a command when the Virtual Server gets created. To do that, go into System Settings -> Module Config -> Actions upon server and user creation, and take a look at “Command to run after making changes to a server”.

What you could do is write a script that would take advantage of the variables available to you (click on the help link for that option to see the available variables that can help you out).

Your script could simply append a given line to the users crontab file in /var/spool/cron/crontab/$USERNAME.


Dear Eric,

I’ve explored your suggestion and I’m able to add the crontab for each new Virtual Server! I’m not able to remove the entry, but I hope to dedicate a few during the next weekend :slight_smile:

Many thanks,