Is it possible to perform actions at certain moments. Like resetting a
database record every first day of month?
regards,
Roderik 4 1807
Roderik wrote: Is it possible to perform actions at certain moments. Like resetting a database record every first day of month?
regards,
Roderik
You'll have to start the php interpreter from some external sheduler,
like cron on linux or at(?) on a windows box.
In article <41************ **********@drea der2.news.tisca li.nl>,
Roderik <ma**@roderik.n et> wrote: Is it possible to perform actions at certain moments. Like resetting a database record every first day of month?
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.
--
Sandman[.net]
In article <mr************ **********@indi vidual.net>, mr@sandman.net
says... In article <41************ **********@drea der2.news.tisca li.nl>, Roderik <ma**@roderik.n et> wrote:
Is it possible to perform actions at certain moments. Like resetting a database record every first day of month?
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.
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() "
--
AJ
Treehouse Networks abuse@ www.treenetnz.com
TreeNet Admin wrote: In article <mr************ **********@indi vidual.net>, mr@sandman.net says... In article <41************ **********@drea der2.news.tisca li.nl>, Roderik <ma**@roderik.n et> wrote:
> Is it possible to perform actions at certain moments. Like resetting a > database record every first day of month?
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.
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() "
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: USENETSERVER |
last post by:
This seems to be a difficult concept, I am having a heck of a time finding
information on techniques for simply having a VB app essentially tail and
parse what it finds.
The parsing I can handle, and the actions based on the parsing I can handle,
but the simple piece of the puzzle to gather the info as it arrives in the
log file is eluding me.
The scenario is this. I have a tool that will send its updates every so
often to a web...
|
by: craig |
last post by:
I am working on my first .NET development project that involves custom
role-based security per the project requirements. This lead to a general
design issue this week that really caused us some concern. I have described
the situation below because we are very curious to see what other, more
experienced, developers might suggest. The specific classes and fields are
used just to illustrate the concepts.
Our application uses role-based...
|
by: HL |
last post by:
I am using VS 2005 Beta - C#
Problem: The Timer fires a few milliseconds before the actual Due-Time
Let's say a timer is created in the following manner:
System.Threading.Timer m_timer = null;
Let's declare a constant
Int32 m_TimePeriod = 10000;
|
by: scorpion53061 |
last post by:
What I thought would be pretty easy has turned out not to be.
I have three variables. Actiontime is formatted as 08/11/2004 11:03PM
Actiontime
JobStreamStart (11:00:00PM)
JobStreamEnd (2:00:00AM)
If (Format(CDate(ActionTime), "t") >= JobStreamStart AND
(Format(CDate(ActionTime), "t") < jobstreamend Then
|
by: stefaan |
last post by:
Hello,
I have recently had to deal with an XML-based
programming language. (The programs are
generated programmatically.)
XML leads to a "two-level" parsing problem: first
parse the xml into tokens, then parse the tokens
to grasp their meaning (based on the semantics
of the programming language).
| |
by: =?Utf-8?B?c3VwcG9ydGRldg==?= |
last post by:
Hi,
Is it possible in visual studio 2005 at design time to link
a control on Form 1 to another control on Form 2.
Regards
Charles Mifsud
Shireburn Software Ltd.
|
by: Derekc25 |
last post by:
Hi,
I'm trying to create macros for an excel sheet, where i have different actions required for different tasks, each action has its own individual time, I place a "X" in the cell underneath each action and sum up all cells containing an "X" at the end.
So that when I place an X in say 4 cells and each cell will be related to a time in seconds or minutes, how can I add these 4 values and display the total time these actions would require?...
|
by: ataulhaq |
last post by:
Hi,
I have a table in which i have the information about actions along with the date/time when the action happened. I want to know maximum simultaneous requests for a given action at any given time.
Example: Users signing into web site. Here is some sample data (using integers at timestamps to keep the example simple) :
1. User A logs in at time 0.
2. User B logs in at time 0.
3. User C logs in at time 1.
4. User D logs in at time 3.
|
by: wanwan |
last post by:
Hi,
I'm looking for a better way to do a date/time elapsed event rather
than a timer elapsed event.
Currently, I wrote my program to use a timer elapsed event set to 1
second, and it checks the date/time in the event. Is there a better
way?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |