English 中文(简体)
• 如何使用视窗任务表表格式的PHP书写
原标题:How to run PHP script with Windows Task Scheduler

I am using codeigniter to create some cronjobs I scheduled it using Task schedular in windows 7. It runs every one minute but what i see is it just popup my code in an editor and does not insert any data in my database that I mentioned in index function.

<?php
class Hello extends CI_Controller {
 public function __construct() {
    parent::__construct();
    $this->load->database();
}

public function index() {
     $this->db->query("INSERT INTO test_cron VALUES(null,  username )");
}
}
?> 

我怎样才能真正执行《公约》 在我的数据库中插入数据

成就

问题回答

www.un.org/spanish/ecosoc 缩略语

* 九次指挥:

www.un.org/spanish/ga -e -u USERNAME

1. 如果你有一氧化二氮:

env EDITOR=nano crontab -e -u USERNAME,其中用户名称为启动该笔文字的用户。

If you wanna run it hourly:

www.un.org/spanish/ecosoc

For Windows 7, as you asked: Start => Accessories => System Tools => Task Scheduler

  • Create task
  • Actions
  • New
  • choose the path to script and don t forget to add php before script, in order to execute, not just open.

具体期限或日期的文字使用Triggers

此外,还没收了你改用购买力平价文字的任务。

crontab is a linux program and you say that you are using windows 7; in windows you will have to try a similar thing with scheduled tasks

(该辛迪加只是为了不一而设)

在您的服务器上,你使用<条码>crontab-e,向您开放编辑,在您的台上添加该代码。 为了每小时运作,将线路改为:

00 * * * * /usr/local/bin/php5 $HOME/system/scripts/clean_cache.php

crontab格式





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签