1. Home
  2. General info
  3. Delete inactive subscribers command

Delete inactive subscribers command

Starting with version 1.3.7.1 we introduced the delete-inactive-subscribers command which will delete subscribers that did not open a campaign or did not click a link in a campaign in a given period of time.

The command has the following signature:

command: /usr/bin/php -q {ABSOLUTE_PATH_TO}/apps/console/console.php delete-inactive-subscribers --list_uid=LIST_UID --time=EXPRESSION --limit=1000
--list_uid=UID where UID is the list unique 13 chars id from where you want to delete subscribers.
--time=EXPRESSION where EXPRESSION can be any expression parsable by php's strtotime function. ie: --time="-6 months".
--limit=1000 where 1000 is the number of subscribers to process at once.


So a valid call to this command will look like:

/usr/bin/php /var/www/html/apps/console/console.php delete-inactive-subscribers --list_uid="hd930corv7399" --time="-6 months" --limit=1000 --verbose=1

The above will delete 6 month inactive subscribers from the list having the UID hd930corv7399 and will do this by processing 1000 subscribers at once.

You can place this command in a cron job to run once a week (on Sunday) to delete inactive subscribers, like:

* * * * 0 /usr/bin/php /var/www/html/apps/console/console.php delete-inactive-subscribers --list_uid="hd930corv7399" --time="-6 months" --limit=1000 --verbose=0 >/dev/null 2>&1

Was this article helpful?

Related Articles