Occasionally, you may need to execute a command on your server at an odd time. It can be a nuisance to have to wake up at 4 in the morning to run a software update or some other mundane task. You could setup a cron job, but that is usually for recurring tasks and may be a little more involved that simply running a command for a single instance. Fortunately, Webmin has a handy tool that allows you to schedule commands.
To schedule commands in Webmin, do the following:
- Login to Webmin (usually http://[ip-or-hostname]:10000)
- Under “System”, choose, “Scheduled Commands”
- Select a user to run the command
- Set the date and time for the command to execute
- Choose the directory for executing the command
- Type the commands you want to execute (You can enter more than one)
- Optionally, choose to have an email sent to you upon completion
That is all it takes. Your command will run once at the time you schedule and never again. It is that easy.
- How to Create Cron Jobs with Webmin
- How to Schedule a Linux Server Reboot
- How to Install Webmin on a CentOS Server
- List All Linux Commands with Compgen
- How to Create an Apache Virtual Host in Webmin