[cups.general] Option for delete historical jobs

pipitas pipitas at gmail.com
Fri Dec 10 11:57:52 PST 2010


On 12/09/2010 11:31 AM, ALi wrote:

> i am going to make an script for putting in cron and cancelling the
> jobs that are queued for more than this days .....
> but i am not sure about how to compare dates .....


Use the GNU "date" command. It has a very convenient way to specify 
dates. Example output:

  kp at kpt33:~$  date -d "3 days ago"
      Tue Dec  7 20:50:29 CET 2010

  kp at kpt33:~$  date -d "2 years ago 3 months ago 14 days ago"
      Fri Oct  6 21:56:09 CEST 2006

  kp at kpuntu:~$ date -d "4 year ago 2 month ago 4 day ago" "+%Y--%m--%d"
      2006--10--06

Note that the use of plural is optional.





More information about the cups mailing list