Executing a Linux/Unix command and passing it’s output to php via cron

  cron, linux, php

I have this cron job:

awk -F" |/" '{print $5}' /proc/loadavg >>/home3/***/cpu.log 2>/dev/null

It logs my hosting service’s CPU load to a text file.
But I want to pass awk command’s return value to a php script instead of just logging it.
How should I do that?
I know that I should use exec(), but my host provider doesn’t allow me to use it.

Source: Ask PHP

LEAVE A COMMENT