473,573 Members | 2,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to run a script automatically?

Hi there,

I have a php script which creates a .html
gallery with thumbs and links etc..

I would like it to update the gallery
and change the thumbs according to some
random values every 60 minutes

Anyone can suggest me a way to do that?

Thx

Yang

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com

Jul 16 '05 #1
16 8758
Yang Li Ke <ya******@sympa tico.ca> wrote:
Hi there,

I have a php script which creates a .html
gallery with thumbs and links etc..

I would like it to update the gallery
and change the thumbs according to some
random values every 60 minutes

Anyone can suggest me a way to do that?


I would suggest using cron/contab if you got access to it.
It will run your update script every chosen period of time

--
Daniel Kończyk
http://konczyk.net
Jul 16 '05 #2
I'll try that...

"Daniel Kończyk" <dr*******@voru ta.eu.0rg> wrote in message
news:sl******** **************@ gnu.univ.gda.pl ...
Yang Li Ke <ya******@sympa tico.ca> wrote:
Hi there,

I have a php script which creates a .html
gallery with thumbs and links etc..

I would like it to update the gallery
and change the thumbs according to some
random values every 60 minutes

Anyone can suggest me a way to do that?


I would suggest using cron/contab if you got access to it.
It will run your update script every chosen period of time

--
Daniel Kończyk
http://konczyk.net

Jul 16 '05 #3
sorry, wrong post...

"Rob @ Home" <no****@nospam. com> wrote in message
news:RK******** ***********@rwc rnsc52.ops.asp. att.net...
I'll try that...

"Daniel Kończyk" <dr*******@voru ta.eu.0rg> wrote in message
news:sl******** **************@ gnu.univ.gda.pl ...
Yang Li Ke <ya******@sympa tico.ca> wrote:
Hi there,

I have a php script which creates a .html
gallery with thumbs and links etc..

I would like it to update the gallery
and change the thumbs according to some
random values every 60 minutes

Anyone can suggest me a way to do that?


I would suggest using cron/contab if you got access to it.
It will run your update script every chosen period of time

--
Daniel Kończyk
http://konczyk.net


Jul 16 '05 #4
is there anythingelse ?

Because I dont know how to set the chron jobs
directly from a php script, is this possible?

Yang

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Daniel Kończyk" <dr*******@voru ta.eu.0rg> wrote in message
news:sl******** **************@ gnu.univ.gda.pl ...
Yang Li Ke <ya******@sympa tico.ca> wrote:
Hi there,

I have a php script which creates a .html
gallery with thumbs and links etc..

I would like it to update the gallery
and change the thumbs according to some
random values every 60 minutes

Anyone can suggest me a way to do that?


I would suggest using cron/contab if you got access to it.
It will run your update script every chosen period of time

--
Daniel Kończyk
http://konczyk.net

Jul 16 '05 #5
On Tue, 9 Sep 2003 20:21:10 -0400, "Yang Li Ke"
<ya******@sympa tico.ca> wrote:
is there anythingelse ?

Because I dont know how to set the chron jobs
directly from a php script, is this possible?

Yang


First, make CERTAIN the system administrator is OK with the idea!
Then all you need to do is open /etc/crontab and append the
appropriate record - it's simple text. A better approach (IMHO),
would be to set up cron to run a shell script and then have your php
code rewrite that script as required... keeping your code from
potentialy messing up a system service. ;-)>

Mike-
Mike-
Mornings: Evolution in action. Only the grumpy will survive.
-----------------------------------------------------

Please note - Due to the intense volume of spam, we have
installed site-wide spam filters at catherders.com. If
email from you bounces, try non-HTML, non-encoded,
non-attachments.
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 16 '05 #6
Michael W. Cocke <co***@catherde rs.com> wrote in message
Then all you need to do is open /etc/crontab and append the
appropriate record - it's simple text.


While this is correct in theory - in practise you should be much more
careful. *If* the computer shuts down for any reason during this
procedure your entire cron file wil be lost. For those of us will 30
enttries in the cron file this is not good. A better way to write to a
cron is to write to file and then overwrite the existing cron witht he
new one. Like this:

$ crontab -l > /tmp/newcron.file
$ vi /tmp/newcron.file
$ crontab /tmp/newcron.file

Sylvie
Jul 16 '05 #7
On Wed, 10 Sep 2003 05:48:29 -0700, Sylvie Stone wrote:
$ crontab -l > /tmp/newcron.file
$ vi /tmp/newcron.file
$ crontab /tmp/newcron.file


surely:

$ crontab -e

does the same thing?

Cheers,
Andy
Jul 16 '05 #8
"Andy Jeffries" <ne**@andyjeffr ies.remove.co.u k>
surely:
$ crontab -e
does the same thing?
Andy


Hi Andy - sorry but crontab -e does *not* do the same thing. crontab
-e edits the cron file directly creating the same senario whereby if
the computer crashes you lose your file.

Sylvie
Jul 16 '05 #9
Sylvie Stone <sy*********@ca nada.com> wrote:
"Andy Jeffries" <ne**@andyjeffr ies.remove.co.u k>
surely:
$ crontab -e
does the same thing?
Andy


Hi Andy - sorry but crontab -e does *not* do the same thing. crontab
-e edits the cron file directly creating the same senario whereby if
the computer crashes you lose your file.


Hi Sylvie,

You are wrong, crontab -e does exactly that, copies the current crontab into
a temp file, edits the tempfile and overwrites the current crontab.

JOn
Jul 16 '05 #10

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

Similar topics

7
9744
by: LRW | last post by:
Sorry to crosspost, but I have no idea if this is more a PHP question of general Linux question. I have a script that makes changes to image files, montages them into a jpg, and creates a Web page with that image. It starts with someone from our graphics dept. who I set up to copy the image files over to the Linux server with SAMBA. The...
7
2294
by: Spidah | last post by:
Please forgive me if this has been asked before. Is it possible to have a php script run automatically? I am talking about the sort of script that handles regular activities such as issuing invoices, reminders etc? How are these run? Does somebody have to go in and push a button, do you have to tell the server to run these scripts at a...
5
2621
by: Tim Morrison | last post by:
Is there any easy way to create a change script as illustrated below for all tables within a database? Right now I would have to create a seperate script for each table. I would like to be able to update the customers database while preserving their exisiting data. ...
2
1730
by: Dennis | last post by:
This may be easy for most but I can't get this thing to work. I believe I followed all the instructions but when I click on the link no window opens just the default IE page cannot display. Here is exactly what I entered in the link dialog: <a href="javascript:popImage('http://www.sambuccibros.com/carseat.jpg','New Car Seat')"> Is this...
2
2014
by: Efrat Regev | last post by:
Hello, I'm a data-structures course TA trying to write a python CGI script for automatically compiling and testing students' projects. Unfortunately, I've run into some questions while writing this, which I couldn't solve with the various (and helpful) python-CGI documentation. (It's possible that I'm posting to the wrong group; if so, I'd...
7
9914
by: Wladimir Borsov | last post by:
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). Furthermore NO button click should be required (so I am not talking about a perl script in a form). I only want to call this script automatically when someone load the web page. ...
11
21980
by: Gregor Kovač | last post by:
Hi! I have an SQL script with bunch of CREATE TABLES, ALTER TABLES, ... I'd like it to run transactially. I have found that id I run a ALTER STATEMENT inside a transaction and then roll it back the changes disapear. So if this works for one statement it should also for a script, right ? I run the script with the following command: db2cmd...
1
1519
by: fortwilliam | last post by:
I have a newsletter system and want to have it work automatically. what I have so far works with a visitor to a page with a tiny iframe in it. This iframe calls up the send.pl newsletter script. Trouble is that if the visitor refreshes the page before the script has finished, duplicate emails are sent out. Or if they leave the page before the perl...
14
5395
by: asdf | last post by:
I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks
0
7750
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, 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...
0
7674
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...
0
8182
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7744
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...
0
6369
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3708
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3708
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2170
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1271
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.