Creating Cron Jobs in Windows 10 and Windows Server 2016

I recently made the switch from a Linux LAMP server to a Windows Server 2016.  It didn’t take me too long to figure out I forgot to transfer my cron jobs for my PHP pages. I went to start the transfer and I soon realized that Windows does not support cron jobs. However, I did find the Windows version of Cron jobs. Below is what I did to create these cron jobs so my PHP crons will continue run on schedule. This trick will really work in all versions of Windows, but you must get to it different methods.

Continue reading “Creating Cron Jobs in Windows 10 and Windows Server 2016”

MySQL – Too many files open

I run my servers on CentOS using cPanel/WHM. When I first started running my own server, it did not take long for me to see how little I know about Linux. I had a funky problem with my MySQL dropping out after so much time. It seemed like the more people I had on my sites, the faster it would go down. But after I rebooted the server, it all started working fine again… For a while anyway.

I got to looking around to see if there is a error log for MySQL. And sure enough there is. By default, the error log is located at:

The **HOSTNAME** would be your server’s hostname, (if you do not know your hostname, simply use the command “hostname” and it will output your hostname)

To view the last 500 lines of your error log, simply use:

In my error log, I began to see this:

 

Did a little bit of googling, and discovered that by default, centOS has a hard limit of the amount of files that can be opened at a time, which causes MySQL to error out until you reboot the server. However, this can be fixed by running the doing the following:

Add this line at the bottom of the config file:

 

Save and close the file, then reboot the server.

After you rebbot your server, you will want to run the following command to verify that your settings was saved and correct:

If it reads 10000, then your server is now ready to handle MySQL!

Creating cron jobs in Windows 8 and Server 2012 (or any version of Windows)

I recently made the switch from a Linux LAMP server to a Windows Server 2012.  It didn’t take me too long to figure out I forgot to transfer my cron jobs for my PHP pages. I went to start the transfer and I soon realized that Windows does not support cron jobs. However, I did find the Windows version of Cron jobs. Below is what I did to create these cron jobs so my PHP crons will continue run on scheduale. This trick will really work in all versions of Windows, but you must get to it different methods.

Continue reading “Creating cron jobs in Windows 8 and Server 2012 (or any version of Windows)”