how to execute a php file after every half n hour without using schedular (cron jobs).

i need to upload pdf files automatically from system to server after every half n hour.but without using cron jobs.Please help

Recommended Answers

All 7 Replies

If you have a page with web trafic you can add code to write timestamp in a file and test if is older than 30 minutes to do the job and rewrite timestamp (first).

Why not CRON jobs etc? PHP isn't really meant for this kind of task. Executing something regularly would normally be done using something like a CRON job or something like an application running in the background.

upload from the local system does not need a cron job at the server
local system task scheduler to start an ftp client will do it

i need to upload pdf files from a local sys directory to server directory ....automatically after every half n hour. Please give me some steps and code help

check the helpscreens for the ftp program of preference
(ftp, filezilla, cuteftp, all have startup parameters that can connect to server, synchronize folders, exit. I assume that all do.)
Add that to the task scheduler with a half hour schedule, using guidance from the helpscreens to task scheduler.

But you say than you want execute a php file, what do this file?
where is it?
I use filezilla and don't find options to do that automaticaly.
I use wget or rsync to do this kind of tasks.

But you say than you want execute a php file,

No you doesnt
the op wants to schedule a file upload to synchronize a folder of pdf
and wants ideas to work with, postulates a php script

the other you, in answer says executing a php file by cron is unneccessary

what do this file? where is it?

if it is done serverside, then you he me us has to write the script another reason to use a local task

I use filezilla and don't find options to do that automaticaly.

what you read about scheduling php, is not what is written in the answer.

I use wget or rsync to do this kind of tasks.

... .. . without cron . .. ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.