Reputation: 1774
The one below is a common way how a master and a child script do data sharing:
cron job -- schedule --> master script
HTTP request -- trigger --> child script
master script --> [database] <-- child script
But is it possible to them to share the data using any of these below, instead of the database?
global
variableUpvotes: 0
Views: 568
Reputation: 7866
memcached
- yesapc
- yes, but will require explicit configuration to enable in cli sapiramfs
to store files in an in-memory filesystem.In case i left anything out, you can search for php interprocess communication
Upvotes: 1
Reputation: 4774
I second a file solution:
Upvotes: 1
Reputation: 3042
Of course, you can connect to MySQL servers from cron-job (php-cli
) executed scripts just like how you can from the webserver, assuming that the php.ini
for command-line has the database library loaded.
If you don't want to use database, you can either set up sockets or use temporary passthrough files. But using the database would be the most efficient and tidy way.
Upvotes: 1
Reputation: 11080
The only way left is fs. Either socket as DaveRandom suggests, or a simple file.
Why don't you want to use the database? What are you trying to do specifically?
Upvotes: 1
Reputation: 16864
Upvotes: 1