Jump to content

Recommended Posts

Posted

No, because not everyone who uses mysql on our servers lives in Sao Paulo timezone. Just use this command in php:

date_default_timezone_set("America/Sao_Paulo");
By the way you can do the simple queries I listed in my code with one mysql query. I just wanted to show you how to do a loop over each of your accounts because it seemed like it might be useful to you.

update accounts set accounts.enabled = '0' where accounts.type = 'FREE' and accounts.reg_date < (date_sub(curdate(), interval 15 day));
Posted

Hello, you told me to tell you when I am done with my Cron Job.


I create a new cron job that should executed every 12 hours, could't test the cron job itself


but the php code is working.



The command line is php -q /home/flpcarv/private/expireTrialLicenses.php


I am not sure if its "OK" to leave the path like that or I should put somewhere else.



I think the cron job should run every 1 hour.



Well thats it, thanks.

Posted

The way krydos does it, I believe it needs to be runnable in a browser, so it will need to be inside public_html somewhere.

Posted

If it only needs to be run once every 12 hours then you can use it the way it is with the cron page in cpanel. If you need it once an hour as you said earlier then you need to move your script to somewhere under public_html so it's accessible from a browser.

Posted

Yeah I realised that its ok to let it update every 12 hours.
But I am not sure if its working, Am I allowed to set it to every minute just to test it? Once its done I will set to every 12 hours.

 

By the way I am feeling that the server is inaccessible very often, and it seens like Tommy is a little bit more stable, would be a problem to "delete" my Jhonny host and create a new Tommy?

 

http://heliohost.grd.net.pl/monitor/

Posted

If you run more than 2 cron jobs in a day all of your cron jobs will be deleted.

 

Yeah, Tommy is much more stable. That's why we call him the stable server, and Johnny the unstable server. You can switch if you would rather have a server with better uptime.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...