Premium Expiry date is not working!?

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Have you setup the cron tasks? downgrade_accounts.cron.php handles the auto downgrades.
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
This is my downgrade_accounts.cron.php
I don't edit anything.

Code:
<?php

/*
 * Title: Downgrade Expired Accounts
 * Author: YetiShare.com
 * Period: Every 15 monutes
 * 
 * Description:
 * Script to downgrade any accounts which are no longer premium
 *
 * How To Call:
 * On the command line via PHP, like this:
 * php downgrade_accounts.php
 * 
 * Configure as a cron like this:
 * 0 0 * * * php /path/to/yetishare/install/admin/tasks/downgrade_accounts.cron.php
 */

// setup environment
define('CLI_MODE', true);
define('ADMIN_IGNORE_LOGIN', true);
define('LOCAL_ADMIN_PATH', dirname(dirname(__FILE__)));

// includes and security
include_once(LOCAL_ADMIN_PATH.'/_local_auth.inc.php');    

// downgrade accounts
UserPeer::downgradeExpiredAccounts();
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
How to setup the cron tasks? I'm using Cpanel. On 3.x all cron jobs were effected automatically. I do not understand why it does not work now.
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
See here for more info on crons:

https://support.mfscripts.com/public/kb_view/26/
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
The path is wrong, you need the FULL path

eg: /home/"username"/public_html/admin/tasks/downgrade_accounts.cron.php

Change "username" to whatever your cPanel account username is.
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
joymax27104000 said:
Hi Adam,

I were added Cron like that:


Wrong or Right?

Thanks a lot
If you want to raise a ticket with access details to your install, I'll review all this for you. :)
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
Hello,

This is error when I try add Cron:


Please help me, I don't understand to convert to Cpanel:
"0 0 * * * php /path/to/your/yetishare/admin/tasks/downgrade_accounts.cron.php"


Thanks
 

parham4229

New Member
Sep 3, 2014
46
1
0
Just choose once a day from cpanel settings and add this to the command part

php /path/to/your/yetishare/admin/tasks/downgrade_accounts.cron.php"

make sure you change the /path/to/your/yetishare/ to the path of yetishare installation
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
This is my cronjob, but still not working:


I were add more 12 hours ago, when will this cron working?
Thanks for helping
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
This is error:
/home2/myuser/public_html/myuser/admin/tasks/downgrade_accounts.cron.php: No such file or directory

**About home2 >>> because:
My support hosting have created a symbolic link to forward /home to /home2.

ln -s /home2/myuser /home/myuser

Please help me
Thanks a lot
 

joymax27104000

New Member
YetiShare User
Jun 4, 2014
131
0
0
Dear ysmods,

I were do it:
/home2/myuser/public_html/myfolder (not myuser)/admin/tasks/downgrade_accounts.cron.php

and this is error:
/home2/myuser/public_html/myfolder (not myuser)/admin/tasks/downgrade_accounts.cron.php: No such file or directory

My problem due to or not?:
**About home2 >>> because:
My support hosting have created a symbolic link to forward /home to /home2.

ln -s /home2/myuser /home/myuser

Thank you very much
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
No, that would not cause that problem.
It is definitely a path issue due to the "No such file or directory" error.

Send me your website address and I'll take a look.