计划任务执行php文件有关问题
计划任务执行php文件问题
写了个a.php文件,
又写了个bat,内容是:
C:\wamp\bin\php\php5.3.8\php.exe -f E:\photoselect\work\a.php
在任务计划里定时执行bat,设置5分钟执行一次
但经常5分钟是处理不完的,会在5分钟后又跑了一个bat,这样会出错,
(在计划任务里已经设置了到时未运行完成,不起新实例),但貌似无效,不知道这是不是仅针对exe的
请各位帮忙,谢谢
------解决方案--------------------
5分钟处理不完,只能想办法提高a.php的效率了,查查瓶颈在哪里,考虑多线程。
另外未完成不起新实例,是针对bat的,php里你需要自己实现重复进程检测。
------解决方案--------------------
修改a.php的文件 运行的时候判断是否还有在运行,是的话直接退出.不是的话运行结束销毁标志

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
