This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Cron job
Cron job
Hi guys,

I noticed that cron job most of the time work with only direct php call no need for full path.

So the question why we redirect output to /dev/null why we don't log it so we get last daemon run time and last output in case!

php -q /etc/zpanel/panel/bin/daemon.php > /panel_path/daemon_last_run.log

Also no need for the mess and permission to creat the cron all we have to is here:

# CRON specific installation tasks...
sudo crontab -l -u $HTTP_USER> /tmp/mycron; echo "*/5 * * * * nice -2 php -q $PANEL_DAEMON_PATH >> $PANEL_PATH/daemon_last_run.log 2>&1" >> /tmp/mycron; sudo crontab -u $HTTP_USER /tmp/mycron; sudo rm -f /tmp/mycron

You will notice the variables here.

I'm trying to improve the installer so we can have ONLY ONE installer and variables like this would help adapting to the OS, as most of them are changed uppon OS detection process.

I got :


As you can see here:

5050 TGates Nigel motters kandrews
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Thanks given by:
RE: Cron job
Looks good to me, tested it and its working.

I've made a fair few changes at

Pull them in before you make too many more changes Smile
Thanks given by:

Forum Jump:

Users browsing this thread: 1 Guest(s)