Page 1 of 1

Auto delete users, windows scheduler or unix cron

Posted: Mon Feb 17, 2003 4:22 pm
by senthil
Hi:

I would like to delete all the users of my (employer's) site, whose account is inactive(did not login) for 30 days. I can write something like, "DELETE from usertable where...". I want to run this every night, check regularly and delete the users. I searched on this topic and found about windows task scheduler and unix cron.

But my problem is, I'm not yet done with the web site, I'm still working on it. I dont know whether it will be hosted in a windows or unix server. I can upload all the html and php files once I get the username and password for the host server space. But how will I specify this auto delete script. Will I be able to access the task scheduler of the host machine or what should I do if its a unix machine (I dont know anything abt unix).

As you might have guessed this is my first website and any reply will be of great help.

Thanks
Senthil

Posted: Tue Feb 18, 2003 6:30 am
by BDKR
It's highly unlikely that a host running a Windows based system is going to let you schedule tasks. Additionally, the Task Scheduler in Windows is extremely unreliable.

If it's a *nix backend (most likely Linux), then it's cron. Just do a search on Google for cron tutorials. You will also need to know if your host has a php executable, normally at /usr/local/bin. There are a couple of tutorials on writing PHP for the command line, and one for using it with ncurses. And don't worry about how well PHP works in this capacity. I do it with three different scripts for my site and three at work.

Just remember, Google is your friend! :twisted:

Cheers,
BDKR