473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

time based actions

Is it possible to perform actions at certain moments. Like resetting a
database record every first day of month?

regards,

Roderik
Jul 17 '05 #1
4 1791
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.
Jul 17 '05 #2
In article <41**********************@dreader2.news.tiscali.nl >,
Roderik <ma**@roderik.net> 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]
Jul 17 '05 #3
In article <mr**********************@individual.net>, mr@sandman.net
says...
In article <41**********************@dreader2.news.tiscali.nl >,
Roderik <ma**@roderik.net> 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
Jul 17 '05 #4
TreeNet Admin wrote:
In article <mr**********************@individual.net>, mr@sandman.net
says...
In article <41**********************@dreader2.news.tiscali.nl >,
Roderik <ma**@roderik.net> 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.

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
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...
3
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...
9
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;...
10
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...
13
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...
7
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.
1
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...
3
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...
7
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.