Roderik wrote:[color=blue]
> Is it possible to perform actions at certain moments. Like resetting a
> database record every first day of month?
>
> regards,
>
> Roderik[/color]
You'll have to start the php interpreter from some external sheduler,
like cron on linux or at(?) on a windows box.
In article <41a74cb9$0$440 63$5fc3050@drea der2.news.tisca li.nl>,
Roderik <mail@roderik.n et> wrote:
[color=blue]
> Is it possible to perform actions at certain moments. Like resetting a
> database record every first day of month?[/color]
Of course, I do it all the time. Question is what kind of host you are running
PHP on. If it's linux/unix, you'd probably use 'cron'. If it's Windows you'll
probably built that built-in schedular whatever-its-name-is, if that can
execute shellscripts.
In article <mr-B843D4.18484626 112004@individu al.net>, mr@sandman.net
says...[color=blue]
> In article <41a74cb9$0$440 63$5fc3050@drea der2.news.tisca li.nl>,
> Roderik <mail@roderik.n et> wrote:
>[color=green]
> > Is it possible to perform actions at certain moments. Like resetting a
> > database record every first day of month?[/color]
>
> Of course, I do it all the time. Question is what kind of host you are running
> PHP on. If it's linux/unix, you'd probably use 'cron'. If it's Windows you'll
> probably built that built-in schedular whatever-its-name-is, if that can
> execute shellscripts.
>[/color]
This is probably more suited to a forum for your particular database.
Web server and its plugins should not be involved in regular DB internal
maintenance.
Most DB have PROCEDURE operations, create one to do what you want and
having the OS run it through one of the above schedulers.
Some full-SQL databases also have TRIGGER command to run SQL
on/before/after certain DB actions.
ie:
in DB:
CREATE PROCEDURE monthly
BEGIN
UPDATE test SET ThisMonth=MONTH (NOW());
END
OS runs <every day, or month, or week, whatever>
mysql -u user -ppass -Dtest --exec="monthly() "
TreeNet Admin wrote:
[color=blue]
> In article <mr-B843D4.18484626 112004@individu al.net>, mr@sandman.net
> says...[color=green]
>> In article <41a74cb9$0$440 63$5fc3050@drea der2.news.tisca li.nl>,
>> Roderik <mail@roderik.n et> wrote:
>>[color=darkred]
>> > Is it possible to perform actions at certain moments. Like resetting a
>> > database record every first day of month?[/color]
>>
>> Of course, I do it all the time. Question is what kind of host you are
>> running PHP on. If it's linux/unix, you'd probably use 'cron'. If it's
>> Windows you'll probably built that built-in schedular
>> whatever-its-name-is, if that can execute shellscripts.
>>[/color]
>
> This is probably more suited to a forum for your particular database.
> Web server and its plugins should not be involved in regular DB internal
> maintenance.
>
> Most DB have PROCEDURE operations, create one to do what you want and
> having the OS run it through one of the above schedulers.
> Some full-SQL databases also have TRIGGER command to run SQL
> on/before/after certain DB actions.
>
> ie:
> in DB:
>
> CREATE PROCEDURE monthly
> BEGIN
> UPDATE test SET ThisMonth=MONTH (NOW());
> END
>
> OS runs <every day, or month, or week, whatever>
> mysql -u user -ppass -Dtest --exec="monthly() "[/color]
If you don't have that, then PHP can be used to build scripts that are
designed to be run from the command-line via the 'php' command.
Comment