I don't know if this is possible, but I need to accomplish an action
at a given hour (what cron does): is it possible to do something like
this having a web hosting service with php support?
any other possibilities to do something like this without having
access to cron facilities?
thanks
giammy 6 1823
On 2006-09-07 14:32:49 +0200, "giangiammy " <gi********@gma il.comsaid:
I don't know if this is possible, but I need to accomplish an action
at a given hour (what cron does): is it possible to do something like
this having a web hosting service with php support?
Yes, if you are able to set cron jobs on your web server. Save your
script in a PHP file like
#!/usr/bin/php
<?php
// Your code here
?>
and call it directly in your cron tab. Don't forget to make it
executable (chmod +x myscript.php or similar).
any other possibilities to do something like this without having
access to cron facilities?
If you are not able to set cron jobs on your server, then you might
want to try this site: http://www.webcron.org/index.php?&lang=en
thanks
giammy
Francois Bonzon wrote:
On 2006-09-07 14:32:49 +0200, "giangiammy " <gi********@gma il.comsaid:
>I don't know if this is possible, but I need to accomplish an action at a given hour (what cron does): is it possible to do something like this having a web hosting service with php support?
Yes, if you are able to set cron jobs on your web server. Save your
script in a PHP file like
#!/usr/bin/php
<?php
// Your code here
?>
....this will only work if you happen to have the CLI PHP in /usr/bin/php and
have permissions to run it. If not, but assuming you have shell access, you
could try accessing a URL using wget or curl.
If you don't have access to cron (or at) you could still write a daemon
process that wakes up at intervals to do its stuff - see sleep().
HTH
C.
*** giangiammy escribió/wrote (7 Sep 2006 05:32:49 -0700):
I don't know if this is possible, but I need to accomplish an action
at a given hour (what cron does): is it possible to do something like
this having a web hosting service with php support?
any other possibilities to do something like this without having
access to cron facilities?
If the schedule is flexible enough and you just want to do it "once a day"
and the like... and taking for granted you do have a web site... A possible
approach is to launch the script from your site. Let me explain:
1) You put your code in a file
2) You choose a page on your site (or maybe an include file)
3) You get a random number and decided upon it whether the script will be
launched
// Not tested!
if(mt_rand(1, 1000)){
system('nohup /foo/var.php &');
}
You can make additional checks so it won't be executed in less than X
hours.
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
There are webservices that "visit" a page at specific times. Not really
secure, but it is easy to set up.
adlerweb
giangiammy schrieb:
I don't know if this is possible, but I need to accomplish an action
at a given hour (what cron does): is it possible to do something like
this having a web hosting service with php support?
any other possibilities to do something like this without having
access to cron facilities?
thanks
giammy
adlerweb wrote:
There are webservices that "visit" a page at specific times. Not really
secure, but it is easy to set up.
adlerweb
Will you post some links of some of the web services that do this?
Thanks,
jl
jl wrote:
adlerweb wrote:
There are webservices that "visit" a page at specific times. Not really
secure, but it is easy to set up.
adlerweb
Will you post some links of some of the web services that do this?
Thanks,
jl
i found this: http://www.webcron.org This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sherryonline |
last post by:
i have a page and i need that page to be called every day at 12:00
that page is going to connect to the database fetch some emails and
will start mailing them how i am goning to do this.
|
by: vagrantbrad |
last post by:
I'm using python 2.4 running on Fedora Core 4. I have written a python
program called ipscan.py that checks the external ip address of my
cable internet connection, and on change, will update the dns records
at my dns provider, zoneedit. So basically, I've setup dynamic dns
using python. Once the ip compare and/or update is complete, I log the
results to a text file called update.log. When I run the program in a
bash shell with the...
|
by: the.natalie |
last post by:
Hi.
I am a newbie to mysql, cron, and shell scripting, so please bear with
me. I have a script that is used for updating an image directory based
on contents in a database. The script does the following: runs
several queries against different tables in a database; returns several
lists of pictures being used in the database; removes any obsolete
images from specific directories. The script is bash shell script.
The problem is that...
|
by: jcor |
last post by:
Hi, I'm trying to run my first cron job, probably it's missing something.
I created a perl script just to test, it's called "teste"
!/usr/bin/perl
open(DATA,">>/home/joao/files/output");
@Now = localtime(time);
print DATA "@Now\n";
exit ;
|
by: Phil |
last post by:
I have a php script that queries some Oracle DB and outputs a single
line of plain text with <brat the end for each query. This is
Apache2, php4.4.8 and Oracle Instant Client 10.1.0.5 all on CentOS 4.4
32bit. Php does run as an Apache SO.
It works perfectly if I just hit the page in a web-browser (output to
browser).
It works *perfectly* from the command line (dumps the text to the file
per the redirect)
| |
by: Lawrence Krubner |
last post by:
Do any problems come up when using a static variable in a cron job?
Assuming the cron job is called every 5 minutes for one year. Assume
I've got an array that stores the names of which users are logged in to
a particular website at the current moment. Would it cause me trouble if
I made this array static? If it would cause trouble, what's the easiest
way to persist the data? I could use a database, but that seems heavy
handed for a 20...
|
by: Stephen Cattaneo |
last post by:
Hello all,
I am attempting to execute an automated test (written in Python) via
cron. I have to check the HOSTNAME variable as part of the test, oddly
under cron the HOSTNAME environment variable is not in the os.environ
dictionary. I know that cron runs in a subshell that does not have all
of the normally set environment variables. HOSTNAME is not one of those
variables, it is set even in cron's subshell. Why doesn't python get...
|
by: Cameron Simpson |
last post by:
On 17Aug2008 21:25, John Nagle <nagle@animats.comwrote:
Because $HOSTNAME is a bash specific variable, set by bash but NOT
EXPORTED! Like $0 and a bunch of other "private" variables, subprocesses
do not inherit this value. From "man bash":
Shell Variables
The following variables are set by the shell:
|
by: Karthik Gurusamy |
last post by:
Hi,
I'm working on a cron like functionality for my application.
The outer loops runs continuously waking every x seconds (say x=180,
300, ..).
It needs to know what events in cron has expired and for each event do
the work needed.
It's basically like unix cron or like a calendar application with some
restrictions. The outer loop may come back a lot later and many events
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: 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
|
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...
| |