Bug #13442

Saved clipboard maximum age setting is not considered by default

Added by José Raddaoui Marín about 1 year ago. Updated 10 months ago.

Status:FeedbackStart date:11/20/2020
Priority:MediumDue date:
Assignee:Michelle Curran% Done:

0%

Category:Clipboard
Target version:-
Google Code Legacy ID: Tested version:2.5, 2.6
Sponsored:No Requires documentation:

Description

Github issue reported by Michelle:

https://github.com/artefactual/atom/issues/1218

From a related email thread:

A minor detail is that, if you set that setting to 0, it's ignored when the task is executed and all saves are deleted. But more importantly, the task needs to be executed in order to clear those saves and I could not find any documentation about it. Moreover, to make it work as in the docs it should be scheduled automatically (using cron for example). Having the task scheduled and the setting set to 0 will delete all saves at the time it's executed, so that part may just need some wording in the documentation, but we should include some notes about how to set up that cron task.

History

#1 Updated by Mike Cantelon about 1 year ago

  • Status changed from New to Feedback
  • Assignee set to Michelle Curran

If I save a bunch of clipboards then set the max age to 0 then run the CLI task all clipboards get deleted. The CLI task has to be run, though, either manually or added to a crontab.

#2 Updated by Redmine Admin 10 months ago

Mike Cantelon wrote:

The CLI task has to be run, though, either manually or added to a crontab.

I came up with a simple crontab, save it at:
/etc/cron.d/atom-clipboard-purge

SHELL="/bin/bash" 
MAILTO="" 
# Atom: Purge clipboards daily
# set value to 0 at https://atom.site.url.com/settings/clipboard ->
# Saved clipboard maximum age (in days) 
#
# Test: this runs every minute. Watch /var/log/syslog to debug
#  * *    *   *   *   www-data  cd /usr/share/nginx/atom/ && php symfony -f tools:expire-data clipboard 2>&1 && echo "OK" || echo "Not OK" 
#
# m h  dom mon dow   username   command
  0 0    *   *   *   www-data   cd /usr/share/nginx/atom/ && php symfony -f tools:expire-data clipboard

Uncomment the line right under Test to test it running every minute.

Also available in: Atom PDF