How to setup cron jobs on Windows? - php

I developed notification.php to send a notification email to the users and I it works successfully inside a page of my web site now I want to create a cron job to run this page in regular time not associated to refreshing that page. I have not done this before and I barely know cron jobs
After watching this video :
https://www.youtube.com/watch?v=S-UZsAk_UiE
Where can I find cPanel?
My System specifications are:
1- MySQL database
2- Windows Server 2008 Enterprise

You can't install cPanel on Windows. It's Linux only. Windows uses "Task Scheduler". You might want to check this out: https://support.qualityunit.com/384836-How-to-set-up-cron-job-on-a-Windows-server

Related

Using website to stop and launch applications on same machine

I am in the process of setting up a website for users to sign up for accounts to access applications on a server running Windows Server 2019 with IIS, MySQL, PHP, and FastCGI.
The website works fine, the applications work fine, but it becomes rather tedious to have to login via RDP to restart an application if it hangs up, needs a manual update, etc. I have tried searching via google, and came up empty on this, but is there a way via php, jquery/AJAX, etc., to click a button on my website's admin panel to send a command to Windows to shutdown and/or restart an application?
Example:
Let's say I have my website located at C:/webroot/htdocs/" and an application at "C:/servers/server1/server.exe
I want to send a command from the website to close any active windows for server.exe (the console window(s)) if I hit "Stop Server" on the webpage. If I hit "Start Server" it will send a command to launch the server.exe program. Finally, if I hit "Restart Server" it will perform the stop action, followed by the start action in a single click.
Is this possible without needing to purchase any type of third-party application?
I know there are cron jobs, but I am not sure exactly how to utilize them, especially in this type of scenario.

How can I schedule a job for a PHP script stored on our FTP server without using third parties like Cpanel etc?

I have a script that triggers an email to be sent with a CSV attachment. I want this to be automated for specific times, It needs to be so it can run at night when I am not active on my PC. I would rather not use third party sites to trigger these jobs. Microsoft Azure or our Ubuntu server could be options if possible.

I need something like CRON but for IIS 8.5/PHP on Windows Server 2012R2

This PHP script has to run every twenty two seconds. How can I pull this off without CRON on a Linux box?
C:\inetpub\wwwroot\4dalulz.com\webcam_network\grabimage_cam_18_331103_-64_795038_17z.php
Do you have a basic windows hosting account or is this a standalone box that you have admin access to? If it is a box that you have admin rights to then in windows you can use Task Scheduler, or AT which is a lightweight system like cron. Here is Microsofts link on AT and how to use it http://support.microsoft.com/en-us/kb/313565
If you have shared windows hosting then it gets more complicated. You might want to configure an outside service to request a web-accessible script on your schedule to perform your actions. Something like https://www.setcronjob.com/

Where is the process I executed throught the web page?

I am running a server on my localhost.
through my index HTML page I am executing proccesses, (with the help of php page).
Now, if I am running those programs by myself and not throught the web browser in the html page,
I can see them as applications in the Windows Task Manager (in the Applications bar), and also the windows of the applications themselvs, and the output in running time.
But when I am executing those apps throught the web page, I cannot see them at all (The server and the applications are on my computer)
Why is that? I want to be able to see the result they show me in running time but I cant.
Is there any way to change that?
OS: Windows XP
Server: WampServer 2.2
Did you enable Show processes from all users ?

schedule task in windows 2008 server for php file

i have shared hosting on windows 2008 server and one project in php.
actually i want to run one php file once in a day automatically...
i want to run one schedule task once
in day.
any php code, jquery or ajax
for information.
i have access to ftp to up load files to my domain but i don't have sever access and its windows 2008 server.
how can i run schedule task in php on windows 2008 server?
Thanks
If you don't have access to the server where you can set a schedule job then below are your probable options:
Create a php file on server W(windows2008) then if you have a free hosting account at server L(Linux) where you can setup cron job, then creating a CURL to access server W would do.
If your page is access often the creating a JS script with setTimeout("myAjaxFunction", 10000) would also do but it's an awkward approach as you assumed that user browser open accessing yoursite somewhere else.

Categories