# Create a Scheduled Cron Jobs

**URL:** <https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001>\
**Category:** Help! (Home for newbies)\
**Created:** [October 30, 2020, 8:22pm UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001 "2020-10-30T20:22:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Selik](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/c5a1d2/32.png) [@Selik](https://forum.virtualmin.com/u/Selik)\
**Post date:** [October 30, 2020, 8:22pm UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001/1 "2020-10-30T20:22:46Z")

</div>

**Operating system:** CentOS 7 (64bits) + Webmin and virtualmin  
**OS version:** 7 (64bits)

Hello,

I do not know what problems I have in my virtualmin but every X days it saturates and cannot even be accessed and I have to do a forced restart. To fix this at the moment I have added a cron to restart once a day, but I don’t know why it is not working. I have tried it by running it and it works, but when the time comes it does not restart. Can you help me?

I remove **Input to command** but don’t running

 ![2020-10-30 21_22_09-Scheduled Cron Jobs_Edit Cron Job — Webmin 1.955 on ns3121678 (CentOS Linux 7.8.](https://cdn.forum.virtualmin.com/uploads/default/original/2X/0/042d03c5be06f70bdbe4ae9df6134d232f089bc9.png)

Thank you very much

---

<div class="post-metadata">

**Author:** ![RJM\_Web\_Design](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/rjm_web_design/32/1457_2.png) [@RJM\_Web\_Design](https://forum.virtualmin.com/u/RJM_Web_Design)\
**Post date:** [October 30, 2020, 10:59pm UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001/2 "2020-10-30T22:59:08Z")

</div>

Try `/sbin/shutdown -r now` .

Or better yet, try to figure out what’s causing the problem with CentOS. Since I started using KernelCare and no longer have to reboot for kernel updates, I measure my uptime in months and years. A Linux machine that bogs down and needs to be rebooted every few days has a problem somewhere.

If it’s a public shared Web server, my first bet would be some poorly-written script combined with inadequate resources and/or overly generous resource limits.

Richard

---

<div class="post-metadata">

**Author:** ![Selik](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/c5a1d2/32.png) [@Selik](https://forum.virtualmin.com/u/Selik)\
**Post date:** [October 31, 2020, 10:02am UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001/3 "2020-10-31T10:02:55Z")

</div>

> [@RJM\_Web\_Design](#):
>
> /sbin/shutdown -r now

Thank you very much for your comment, this worked for me. Now the system is rebooted

I don’t know which is the problem, I just install webmin and virtualmin and create 3 webs, any script, do you have any idea to solve my problem?

Thank you very much

---

<div class="post-metadata">

**Author:** ![RJM\_Web\_Design](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/rjm_web_design/32/1457_2.png) [@RJM\_Web\_Design](https://forum.virtualmin.com/u/RJM_Web_Design)\
**Post date:** [October 31, 2020, 12:59pm UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001/4 "2020-10-31T12:59:19Z")

</div>

You’re welcome.

What are the hardware resources of your server?

Richard

---

<div class="post-metadata">

**Author:** ![Selik](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/c5a1d2/32.png) [@Selik](https://forum.virtualmin.com/u/Selik)\
**Post date:** [October 31, 2020, 7:24pm UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001/5 "2020-10-31T19:24:40Z")

</div>

This is

![2020-10-31 20_22_58-](https://cdn.forum.virtualmin.com/uploads/default/original/2X/7/7dbc07a17372a3f39fd5be4fdb92c2e0135653b3.png)

---

<div class="post-metadata">

**Author:** ![RJM\_Web\_Design](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/rjm_web_design/32/1457_2.png) [@RJM\_Web\_Design](https://forum.virtualmin.com/u/RJM_Web_Design)\
**Post date:** [October 31, 2020, 11:06pm UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001/6 "2020-10-31T23:06:03Z")

</div>

An Atom N2800 and 2 gigs of RAM is enough to run CentOS 7 and Virtualmin, but not much more.

When you say “three webs,” that’s pretty vague That CPU / RAM combo should be able to run three static HTML sites without much problem, but three Wordpress or other database-driven sites could start stressing it, especially if they’re popular.

I suggest you install `htop` and `iotop` so when your server gets bogged down, you can get a better idea of what’s causing it.

```
yum install epel-release
yum update

```

then

`yum -y install htop`

and

`yum -y install iotop`

Also. the fact that your server hardware is less-than-bleeding-edge doesn’t rule out a poorly-coded script that’s pushing it over the edge of the resource cliff, or a scheduled backup that running too many threads and overworking the disk (which is already pretty busy caching). Looking at it while it’s struggling is the next step in understanding why.

Richard

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [November 30, 2020, 11:06pm UTC](https://forum.virtualmin.com/t/create-a-scheduled-cron-jobs/108001/7 "2020-11-30T23:06:07Z")

</div>

Closed on November 30, 2020, 11:06pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
