import datetime

yesterday = request.now - datetime.timedelta(days=1)
db(db.post.modified_on < yesterday).delete()

I hope this helps. You can work around it but worked for me in deleting
previous posts up to the previous date. You don't have to manually delete
but works automatically.
Regards

On Sun, 9 Jun 2019 at 12:41, Lovedie JC <lbjc1...@gmail.com> wrote:

> Had one, let check my archives.
>
> On Sun, 9 Jun 2019, 09:47 mostwanted <godirao...@gmail.com> wrote:
>
>> Is there a way to schedule an automatic deleting of content from database
>> on a specified date? I have an application that I want  to delete posts
>> when we reach specified dates. If anyone is familiar with this, your
>> assistance would be greatly appreciated.
>>
>> Regards
>>
>> Mostwanted
>>
>> --
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/bd76a193-c425-43ca-8a7b-157bd137b860%40googlegroups.com
>> <https://groups.google.com/d/msgid/web2py/bd76a193-c425-43ca-8a7b-157bd137b860%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAcHJF_x2me%3DkaWTVpexMRcsvKbt6F_Dxbq6bST76nWhgkeEVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to