Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm helping build a WordPress site for a client, and they've let me know that they want to offer trial subscriptions for their site (they run on a subscription-based model - everything but the homepage is locked down until a subscriber logs in; this log-in system is managed by WordPress by default, along with a role-management plugin for barring users from seeing pages without having the right privileges). They need process a lot of trial orders every day (the ordering system is manual - they take orders from clients by phone), which means they'll need to invalidate or delete a lot of trial usernames and passwords every day.

I've been searching for a WordPress plugin that would allow them to automatically invalidate trial users (based on roles, perhaps) after, say, a week, but so far, nothing has come up. Is there any sort of functionality (either by default, or through a plugin or script) that would allow me to automate the process? The one helpful link I found is a question on StackOverflow (Auto Delete WordPress Users According to Time since Registering) that suggests a running a script that removes users from the database through cron; however, the site is running on a managed Windows server (IIS 6.0), so I don't have access to cron.

Is there anything I can do, short of recommending hiring a plugin developer to write something for them?

share|improve this question
    
Do you have access to the machine / can you install cygwin on the machine? That would provide you with a linux shell that you could run cron no. –  DKNUCKLES Mar 21 '12 at 15:58
    
Yes - I think it might be possible to do that. I can try... –  Itai Ferber Mar 21 '12 at 16:09
add comment

1 Answer

up vote 1 down vote accepted

As you have access to the windows machine, refer to this question from Stack Overflow. You'll need to do a bit of research into crontab to understand how it works, but this is the basic premise the satisfy your need.

Alternatively, you could run a windows script and run it with the Windows Scheduler. This is probably the easier of the two options. I run a similar script that backs up our wordpress databases to our fileserver once a week and it works like a charm.

share|improve this answer
    
I think I'll try the crontab first because I've already got an example of how to make it work; if not, I'll try the Windows Scheduler method. I've got Cygwin and cron installed already, so I'll try to adapt the script to get it to work on our setup. –  Itai Ferber Mar 21 '12 at 16:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.