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
    • Related Articles

    • Move inactive subscriber's command

      Starting with version 1.3.7.1 we introduced the move-inactive-subscribers command which will move 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: ...
    • Delete campaigns command

      Deleting old campaigns, that you don't need anymore, will free up a lot of disk space. This in turn will result in a faster application because there will be less data AppMail has to go through in order to complete operations. The delete-campaigns ...
    • How do I enable command line import for subscribers?

      Importing large CSV files from the web interface, like shown in this article, can be problematic sometimes. This is why we offer an alternative. We offer a way to upload your CSV file which will be queued and then processed by a command line command. ...
    • How do I import subscribers

      This is a common question and even though the answer is very simple, for a reason or another, seems that many people get confused on how they can achieve this, so I will illustrate this, step by step with images. Step 1: Login as a customer into your ...
    • Add subscribers to your email list

      Once your email list is created, next step is to start importing your subscribers into the list. In order to do so, just click on your list title from lists area, then click on the Tools box, followed by the Import box. You will be allowed to import ...