mysql db update script

x3vabx10

New Member
Messages
8
Reaction score
0
Points
1
I want to create a script that updates/uploads data to mysql db. I have an local website and db on my pc & I've done this before using a php script in batch mode @ the command prompt.

I am trying to find a way to do similar on x10 site. I have a free account so from what I read I can't make these updates from my pc to the x10 mysql db remotely.

Can I run a batch php batch script on the x10 server to do database updates? Or what alternatives can anyone suggest to do this? This is a once a day run that takes a few minutes to finish.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
A "PHP batch script" would be a cron job, and yes, you can run crons (one every five minutes) on your Free Hosting account.
 

x3vabx10

New Member
Messages
8
Reaction score
0
Points
1
I'm not familiar with linux. Cron is a scheduler. Is there a way I can get a server cmd prompt or terminal window to manually test a php batch script?
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
I can get a server cmd prompt or terminal window
with x10hosting's free-hosting accounts - the only access you have to the server is through cPanel in your account (e.g. no SSH)
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
That said, there's no fundamental difference between a script run as a cron and one run as, well, a web page. That is to say, you can test it by URL.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
as I remember... x10hosting's free-hosting accounts have restrictions (blocks) on what they can do with PHP inside a Crom job (e.g. database access)
 

x3vabx10

New Member
Messages
8
Reaction score
0
Points
1
I'll have to check that out. In the past I've tested batch jobs inside a browser windows but I've run into problems that it thinks it is loading a page and times out before the script finishes. I might be able to do it with a server php script and use Curl on my pc to load the script.
 
Top