Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





How To Execute A Tasks If The Time Is 22:30:45


crontab work every minute

How to execute a tasks if the time is 22:30:45 or 22:31:01

id | time | script
-------------------
4 | 22:31:01 | script0.php
3 | 22:31:00 | script1.php
2 | 22:30:45 | script3.php
1 | 22:30:00 | script2.php




View Complete Forum Thread with Replies

Related Forum Messages:
Give Time To Execute Something, If It Doesn't Execute, Do Something Else
How can I give time to execute something, if it doesn't execute, do something else?

For example, the code tries to connect to a server, if it doesn't connect it stops the code.

How can I make it so that it tries to connect for 10 seconds, if it doesn't connect it goes on to do something else?

I saw a code doing this somewhere some time ago, but now I can't seem to find it

View Replies !
Time To Execute Script?
I've seen "This page created in 0.04 seconds" on the bottom of some pages, but I'm not sure where to start to create that for my own pages.

View Replies !
Query Execute Time
is there a way to have php spit back the amount of time a mysql query took to execute?

View Replies !
Time It Took To Execute Query
Just wondering if there is any sort of function that allows you to see how long it took for the mySQL queries on that page to execute?

View Replies !
How To Execute Functions At A Given Time.
My problem is, I want to execute a function (php), after 5 minutes, but even when the browser has been shut down. How to do this? Javascript only works as the browser stays open.

View Replies !
Can You Have A Server Execute A Php At Cron Time?
I was wanting to have the server that is hosting my site run a php3 program at a certain time and day. If I was a perl expert, I am sure I could have written it in perl, but since I am not, can php3 be invoked without a webpage?

View Replies !
Script To Execute A Code At Particular Interval Of Time
Well can anybody tell me how can I execute a php file at a particular time interval say at midnight. for eg. I'm having a file named 'test.php' and i want it to be executed automatically at mid night.

View Replies !
Time Previous MySQL Query Took To Execute
Is there a way to get the time in seconds the previously executed mysql query took from php?

View Replies !
Multiple Scripts Running At The Same Time Cannot Execute Session_start().
I'm writing an application that has an over-abundance of AJAX. I have a central script that the user interacts with, and several scripts are called via AJAX request to do various things. It seems however, that multiple scripts running at the same time cannot execute session_start(). Like, If I have one script that is running on the server, that is using sessions, and then kick off another script, the second one will not proceed until the first one is finished.

I need them to run simultaneously. It appears that session_start puts some sort of mutex on the session file on the server, and locks it from multiple access. That makes sense. Am I interpreting the problem correctly and is their a way around it. I don't want to have to use plain old cookies.

View Replies !
PHP Tasks
some times i get this error on my script: Internal Server Error

i researched very much on why this error happens and i get to: i forgot to close some php tasks in my script.

now i know only mysql_close() for closing one of php tasks. what are others php tasks that need to closing?

View Replies !
How Can I Automate PHP Tasks?
I am currently running the same task multiple times a day and I'm sure there is a way to automate it. It is a simple one, but with limited PHP knowledge I'm not sure of the best way to do this. Here's what I need to do

1) log-in to a 3rd party site

2) Download the CSV

3) Upload to my db

View Replies !
Cron Tasks
I'm building an auction site which needs scripts automatically launched to scan the closing auctions. I'll use Linux's crontab.

I'd prefer to avoid installing Php as a cgi and prefer to keep my apache module config.
I'd also prefer to avoid the use of a browser as lynx to do this job because I fear the time-out How I can launch my scripts?

View Replies !
Background Tasks
I'm using some weather rss feeds in a web site. The feeds are updated once every hour and cached in a local file. My problem is that every time the weather report is updating I get a long wait (not that long.. 2 or 3 secs) before the page is displayed.

This happens becauses the teplate engine that parses the page is waiting for the weather section to be parsed and cached. Is there a ay I can start the weather parsing as a background thread and return immediatly to the template engine to continue to parse the page? And if so How?

View Replies !
Automated Tasks
I have an auction site running. Now I want the auction to be able to automatically send a mail msg to the seller after it expires. How do I do it? Obviously there is some sort of way that I can employ so that this task does not require an operator (such as me) to run manually. This task will involve accessing the database and sending an email. Can somebody enlighten me on this?

View Replies !
Directory Tasks
Im looking to do some work with directories. Basically, there are some directories which I want my website users to access fully, and see all the files in there.

My server allows index of directories automatically, where users can see all the files in the directory (unless there is an index page). Code:

View Replies !
Using PHP For Nightly Backend Tasks?
I have to develop a script to be run nightly to go through a database
and send emails based on conditions. It's a large database, and there
are several thousands of emails to be sent during the week everyday.
The script will be run with a cron job at midnight or so.

I was wondering if PHP is suitable for this, or may it be problematic,
for instance would its execution abort after a certain amount of time?
Or is it perfectly fine for this task?

View Replies !
How To Schedule Tasks On Website.
I am trying to figure out how to schedule tasks on my website. For example, PAGE1 should perform a different task in the morning than in the afternoon.

And at the end of the day, I have to extract some data from the database and put them into a file. This should be done automatically.

View Replies !
Script In Windows Tasks
I would like to know how do i work with php in windows tasks. i developed a php web application and i would like to recieve to my email every day a certain report which will be produced by a php script.

View Replies !
Cron/scheduled Tasks
Im running my site on a web server, and want to add something so that every hour the variable $gold = $gold*($workers*3.1) +($banks*30); and the way to do this is cron jobs from what ive gathered from searching google. BUT not only haven't i found a good tutorial, but I haven't found a single example taht isn't with CGI or a download.

View Replies !
PHP/mySQL Running Tasks Automatically?
I have a MySQL DB with all my client details (name, email address etc).

I want to use PHP to retrieve records from the DB and email each of these clients (easy enough) BUT I want the system to automatically do this at pre-defined times.

I have thought about using the UNIX/Linux CRON utility to perhaps call a PHP script that would retrieve specific records (based on a timestamp perhaps?) and then have it email based upon those records.

Does this sound feasible? Are there better ways to do this?

View Replies !
Cron Jobs / Tabs / Tasks And More
I'm building a site with a mySQL db behind it.
There are going to be a lot of records in it with products.

Now i have recently discovered cron jobs, and i thought it
would be a good idea to use those to backup the database.

i have a few questions:

- If i back up the database, does it put the backup
in an actual different db, or just in the same db but
other tables? (Silly question maybe, but i'm new to this)

- Can the DB still be queried bij site-visitors though it's
being backed up?

- Is it possible to just backup new/updated records instead of the
entire db?

- Imagine i backup once a month. can the cron job notice
if the DB is dameged/ has errors, so it'll stop backing up
so it doesn't overwrite the previous backup... or doesn't backup
delete the previous backup?

View Replies !
Executing PHP Tasks While Letting A User Continue To Browse?
I was wondering if someone could help me out with the following two
situations.

In a lot of my web apps, it seems that if i launch a PHP script that takes
a long time to complete, the user is unable to browse/use the rest of the
website until the tasks completes. Is there a way to avoid this?

Specifically, app #1 let's a user choose which files to include in a zip
file, then PHP makes the .zip file on the server and streams it to the user
via fopen/fread. So, as the user is downloading a file on the side (it
presents them with the open/save dialog) they are unable to browse the rest
of the PHP-based site until the download completes; clicking on any links
to pages does nothing, the browser just sits there until the file has been
downloaded, THEN the screen advances.

I am experiencing a similar thing with a PHP mail delivery system. I tried
to create a work-around: a pop-up window that sends an 'exec' command to
the a php-script that sends the email to a few hundred recipients. Again,
even though this action is being done in a pop-up window (and via the
command line, no less), the user is paralyzed in the main window until the
action completes.

View Replies !
Sending Mails Without Using Scheduled Tasks (crone Jobs)
Can we set up a mail program that the mail can sent frequently..ie may be daily or weekly or monthly... with out using scheduled tasks or crone jobs.

for eg .. can we create a page that works like the scheduled tasks page( there we can set up the time at which time the program  will execute )..that means we have options in our webpage to set up the time  at which the mail will sent. for eg..every monday.. can we set up this in the program without using scheduled tasks or crone jobs. can we run our page  frequently without using crone jobs .

View Replies !
Cant Execute Commands With Execute()
I am trying to do the following:

exec("cat filename.txt | /usr/sbin/sendmail -v chandakme@yahoo.com");

It is supposed to mail the contents of the filename.txt to the email adress. If i run this command from the shell , contents of the file are emailed. but if run it from php using exec, i get an email but without any contents . i have already done chmod 777 filename.txt

For some weird reasons, i cant use mail() function of php...so i have to run this command somehow.

View Replies !
Max Execution Time Means Server Execution Time Or Client Browser Hung Up Time?
The max execution time is set up to be 30.

When I submit the requests of execution through the client browser, it shows the execution was running. It still hung up there after 30 seconds, after 2 minutes ...

And the browser hung there forever.

I have another page which saves the reports of the execution, so I open another browser window, and check out the report. It shows me the execution is still going even after 1 minute, 2 minutes... Code:

View Replies !
Deduct Date/time From Daste/time To Display Hours/days Difference
what i'm wanting to do is take away date logged from date closed therefore leaving the time between the 2 date/time stamps so that i can work out the average time later on and display as average time: 1day 2hours .

View Replies !
Compute Current Time For Mountain Standard Time With Daylight Savings (MDT)
I'm trying to compute current time for mountain standard time with daylight savings (MDT);and without DST (MST), eg: Phoenix, AZ. If I use the PHP timezone "US/Mountain", it returns MDT correctly. What is the PHP time zone for MST? Similarly, are there PHP time zones for Pacific, Central and Eastern time zones without Daylight Savings? The PHP time zones US/Pacific, US/ Central and US/Eastern all show time with Daylight Savings.

View Replies !
Show Time / Date To Reflect Eastern Standard Time
my web host is located on the west coast i live on the east coast so if my page shows the date:

$day = date(d);
$mth = date(m);
$yr = date(y);
echo $day . "-" . $mth . "-" . $yr;

i shows the date as of west coast time. so the time now is 1:40am april 6, 2007 my page will still show april 5, since west coast is 3 hours back. (10:40pm apr 5) how do i compensate for this time zone difference? i want my time / date to always reflect eastern standard time.

View Replies !
Convert Query Results To Time Date/time Format
i have a query which displays the start time, end time, and also the duration. these results are displayed, however the duration doesnt seem to display in the correct format, it is displayed as numbers but not in the correct format. Code:

View Replies !
Execute Exe In Php
Im trying to execute a visual basic program that i have compiled and i want to execute it in php. (The vb program takes data out of a mysql database and writes it into an excel spreadsheet).

View Replies !
How To Execute PHP
I know how I can get a PHP script to execute by having a
form with a post method in my regular HTML file. So far so good.

Now I just want to run a PHP scrip from an HTML file to insert a text
file, but how do I execute the PHP without the form + post?

(The text file is a club member list and I want the web page to always
display the updated list)

View Replies !
How To Execute
We installed a third party "ghostscripts" in server (linux). This is to make html to pdf. The question is how can the PHP execute the file

and the application installed in this path
usr/local/share/ghostscript

and my php script installed in this
www.mydomain.com/files/execute.php

View Replies !
Execute Php
i have a base page, which acts as a template, called index.php. when called with parameters (GET) the php code inside this page load an external HTML file and writes its contents into a specific location within the index.php page.

View Replies !
Execute Gpg From Php
The following code works for executing 'ls', but not gpg.

$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read
from
1 => array("pipe", "w"), // stdout is a pipe that the child will write
to
2 => array("file", "/tmp/error-output.txt", "a") // stderr is a file to
write to
);

//LINE BELOW DOESN'T WORK
//$process = proc_open(gpg --output encmail.txt --recipient
someone@domain.com --always-trust --armor --yes --encrypt mail.txt",
$descriptorspec, $pipes);.

View Replies !
Problems With Php Date/time - Real Time Clock
On my website i would like to have a real time clock....i mean to show seconds
running one after another...how can i do this?

Another problem is how to get time into a variable (which then i will insert
into a database table)?

View Replies !
Adjusting Time Displays For User's Local Time
I have a news/comment site where stories and comments are accompanied by the date they were posted. Currently I'm doing that in the GMT format, simply because it's easiest.

What I'd like to do, however, is have the page display posts and comments with "your time," i.e., the local time of the user (example of what I'm talking about here).

I know how to get local time variables from a user with javascript, but I'm not sure how to pass that information to PHP, especially since I'd like to do this on the front page, which means no passing javascript information via query strings.

View Replies !
Make The Time() Function Display The Current Time In GMT?
how do I make the time() function display the current time in GMT?

View Replies !
Ow To Add Then Display The The Total Amount Of Time For A Given Set Of Time Stamps.
I need to know how to add then display the the total amount of time for a given set of time stamps. For example my page looks like this:

task--------time
1-----------start at 8:00
1-----------end at 8:10
2-----------start at 8:12
3-----------start at 8:13
2-----------end at 8:14
3-----------end at 8:20
//notice there is no 8:11

I need to add then display the total amount of time it took for all tasks. Then
separate the individual tasks then figure and diaplay the total amount of time
needed for each individual task. Code:

View Replies !
Change Timezone From Pacific Time To Eastern Time
My host recently moved their servers to Los Angeles, so now all the new posts to the database are in Pacific time.. How can I convert a DATETIME field from the database to display in Eastern Time? Code:

View Replies !
Computing The Time, Every 45 Minutes After A User-entered Time?
How would I go about computing the time, every 45 minutes after a user-entered time? for example, a user enters 05:00, I would like to see

05:45
06:30
07:15
08:00
etc

I figure it will be done using DATE, so I have tried: Code:

$s1 = $sunuptime(date('G:i')+0:45);
<tr>
<td>1st</td>
<td>' .$s1. '</td>
</tr>

View Replies !
System Execute In Php
The same set of command in linux prompts and if call by php program, it does not work. I do not know why. The set of command is already chmod +x and ./what what ,it works.

View Replies !
Execute Php File
I'm working on a search engine. The idea is simple user types a keyword in the text box and then I my program searches for all files (.html, .htm, .txt, php) that have a match.

But I nedd to search the output of php file not the code.

View Replies !
Execute Ph Script
I need to execute a php script in my shell so :

touch test.php
chmod +x test.php
edited the file, inserted the following lines :

#! /usr/bin/php -q
$a = 0;
echo $a;

../test.php

Gives me the following output :

$a = 0;
echo $a;

View Replies !
PHP Slow To Execute
I have some PHP pages at.. which is exhibiting
some strange slowness. It is hosted by secureserver.net (bad?).

When I time how long it takes to load the main web page from the
server
it averages 7 seconds, but often goes to 15.

When I store the main page on my hard drive, the load time is 1
second.

I've tried removing PHP code that might slow things down
but that only brings the load time down to 5.5 seconds best case.

I have other PHP pages on the same server that seem to execute
faster. The key difference between the slow main page and the faster
pages is the faster pages do not use "include" to execute code in
other
PHP files.

However with out "include" and the modularity it affords, my PHP code
would be harder to maintain. What to do?

View Replies !
Execute PHP In A CSS File?
On Apache with PHP is there any way to execute PHP code inside of a CSS file? This is assuming AddType application/x-httpd-php does not list CSS as an extension. I would like to serve my stylesheets as CSS but also dynamically construct the CSS for various browsers (and ultimately hope to keep the number of served stylesheets to one).

View Replies !
Could Not Execute Query
I have a db that I am trying to poulate using an online form but every time I press the submit button it givesm me this error:

Could not execute query : INSERT INTO register (id, name, phone, email, interest, other, type, comments, update) VALUES ('', 'Tom', '0000000', 'abc@abc.com.au', 'Music Performer', 'other things', 'painting', 'none really', 'Y').You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update) VALUES ('', 'Tom', '0000000', 'abc@abc.com.au', 'Music

I am not sure what the problem is.  Can someone have a look and tell me what I need to fix to make this work. Code:

View Replies !
Execute String
I would like to load a string with PHP code and execute it. Is there a command that will let me do that? Maybe something like
php_exec(). I suppose I could always use some sort of shell_exec("php.exe...") trickery but would prefer something more graceful.

View Replies !
Execute Ssh Command Via Php?
I'm trying to make a web interface for my music server. Basically what it's going to do is list all the music files in a directory. Then when a song is clicked PHP executes a shell command, for example "sudo play /var/www/music/System Of A Down - BYOB.mp3" and my server plays the song. So far I've been trying system() and exec() but it do doesn’t seem to work.

View Replies !
How To Execute A Link In PHP ?
I have the following piece of code:

If TRUE {do this;} else {go to this page;}

In the else clause, is there a function in PHP that I can pass in an URL and make it automatically go to that particular page ? The only PHP function I know for this purpose is the "header" function but it does not always work.

View Replies !
Execute As Root
Is there a way to execute commands as root using sudo? If yes, how to use it, if no, how can I get around.

View Replies !
Execute Another Php File
Is their a way to execute another PHP file from a PHP file? for example, say I want to check if a User's Authority level is equal to 3, by using a If statement, and if the User's Authority level is equal to 3, execute another PHP file which executes a function within the file.

How can I do this? if it is at all possible? (your probably wondering why I want to know how to do this, lets just say PayPal isnt very flexible)

View Replies !
Execute A Command
I need to execute a command if either one of the variables is set.

if (!isset($k1) || !isset($k1n)) {...

What is wrong with this statement? It works if I put just one, but cann't seem to get through when I write the statement above. what am I doing wrong?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved