473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scheduling Task using Cron to run php script on a shared server

17 New Member
Hi ,

I wan to run a php script using cron on my host server.

Its a Linux based server and I am allowed to use cron.

I want to run a php script with includes. I tried some suggestions which I found on the net but it didn't work the include files are not executed.

I am new to cron but knows the basic.
Any help is much appreciated.

This may help ...

The website is hosted on a Linux server running PHP version 4.4.4.
Server API : Apache


Thanks
-- Scriptee
Aug 28 '07 #1
5 2406
ak1dnar
1,584 Recognized Expert Top Contributor
I've moved your question from the articles section to the forum.
Aug 28 '07 #2
scriptee
17 New Member
I've moved your question from the articles section to the forum.
Thanks !
Sorry, about that .
Aug 28 '07 #3
mwasif
802 Recognized Expert Contributor
What do you mean by this?
I tried some suggestions which I found on the net but it didn't work the include files are not executed.
Aug 28 '07 #4
scriptee
17 New Member
What do you mean by this?
I tried this from a tutorial like adding

#!/usr/local/bin/php

as the first line of my script where "#!/usr/local/bin/php" is my server's PHP executable location.

This runs a php script without any includes perfectly but when there are include files then it doesn't work.
Aug 29 '07 #5
Atli
5,058 Recognized Expert Expert
I tried this from a tutorial like adding

#!/usr/local/bin/php

as the first line of my script where "#!/usr/local/bin/php" is my server's PHP executable location.

This runs a php script without any includes perfectly but when there are include files then it doesn't work.
Are you giving a relative path to the files you want to include or absolute paths?

I would assume that you would have to use absolute paths. But then again, I have never tried this.
Aug 29 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1838
by: toufik toufik | last post by:
Hi, I've script (or a php file) in the server that I like to execute at 8.00 in the morning every day. (It will check info in the DB and send emails.) Any Idea about how I can do it. Thanks.
6
2328
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something more sophisticated), and what situations might perturb it. Even a hint as to what would be considered normal scheduling might help. The root of our problem is that we observed a normally well-behaved web application suddenly limit itself to a...
0
2563
by: steve | last post by:
I've seen questions about scheduling ASP scripts posted in this group many times so hopefully this will be useful information to a few people. I just wanted to let you all know that our script scheduling service at www.cronservice.co.uk has been rewritten from the ground up and is now better than ever. If you are looking for a way to schedule your ASP scripts and don't have access to cron or task scheduler then you need this service.
9
3678
by: klh | last post by:
We are running on Win 2003/DB2 V8 FP7a. My question concerns Task Center. I have about 200 tasks created and scheduled in Task Center. We are going to be moving many of the databases from this server to another V8 server and I really, really, really don't want to have to re-key all of these tasks on the new system. The Task Center "export" function seems to only export general task information like the description and type of task,...
4
2848
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a vendor. I'd like to be able to create schedules and lock resources for things like collision detection (two events trying to use the same resource). I've seen some GANTT charting components but I don't think that's what I'm looking for. I'd...
12
1669
by: gomzi | last post by:
Hi, I would like to execute some vb code at regular intervals. But according to my hosting provider, I wouldn't be able to do it in a shared hosting environment. So, I would like to know, as to what my options are in that case. Thanks, Gomzi.
3
2345
by: uzzi | last post by:
I don't know how to make a php script to work via cron...I want to make it run daily...My server API is CGI/Fast CGI.I have hosting from godaddy and in the help section i found that i have to specify the interpreter manually...look what it says: i've tried with /web/cgi-bin/php "$HOME/html/path/to/my/script.php as command and it doesn't work. if i run the script in browser it works...what should i introduce as a command..and do i have...
4
2394
by: Rahul | last post by:
Hello All, I have come accross a very interesting as well as a very complex scenario with my current project. My worry is the scheduling of email messages and execution of that based on the cron jobs. For this I am using cron .Suppose Cron is set to execute a file after every five minutes .It executes and returns all the details of scheduled emails suppose 10. Now my problem is how can I synchronize this with the current date and time...
5
3989
by: DavidPr | last post by:
Does anyone here know anything about crons? My web hosting company (IX Webhosting) offers me no help. To enter a cron I have to open my Control Panel - open FTP manager and open Crontab. I enter this for the day, time and command: 5 1 * * 1 /usr/bin/curl -s -o /dev/null/hsphere/local/home/myusername/mysite.com/scripts/remove.phpI just received an email from my server giving me the results of the cron: curl: no URL specified!
0
9645
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10325
Oralloy
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...
0
10148
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
tracyyun
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...
0
6740
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();...
0
5381
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
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
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
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...

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.