latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

What should i insert in the "my-cron-job.php"

Home Forums Community Forum What should i insert in the "my-cron-job.php"

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 3 years, 9 months ago.

Topic Author Topic
Posted: Monday Apr 8th, 2013 at 4:17 am #46832
Enrico Kabas
Username: Enrico

Hi !

I´ll demote Level1-User to Level0-User after EOT-Time.

I configured a cron-job on my server, to start a PHP-File.
But the file includes the code, to increase Level1-User to Level2, after 10 Days of membership.

I testet ” http://www.mysite.com/?s2member_auto_eot_system_via_cron=1 ” and it works perfectly.

Can you give me the right code, to insert them into my “my-cron-job.php” ??

Thanks,
Enrico

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Apr 9th, 2013 at 8:47 pm #46973
Bruce
Username: Bruce
Staff Member

Can you give me the right code, to insert them into my “my-cron-job.php” ??

The point of an s2Member Cron Job is to run a Cron Job outside of WP Cron, and use the standard s2Member Cron processes by having your Cron Job point to http://yoursite.com/?s2member_auto_eot_system_via_cron=1.

If you don’t want s2Member to handle EOT at all, you’ll want to turn OFF the Auto EOT system, and run your own system. You can find the processes that s2Member uses to run EOTs in the following file:

/s2member/includes/classes/auto-eots.inc.php

You might change the portion of this function that demotes the User to something that’s shown in this KB Article:

Knowledge Base » Changing Roles/Capabilities via PHP

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.