Skip to content

Commit 3858fa1

Browse files
committed
MIG database_age_cron
1 parent b3ce2e5 commit 3858fa1

File tree

9 files changed

+539
-0
lines changed

9 files changed

+539
-0
lines changed

database_age_cron/README.rst

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
=================
2+
Database Age Cron
3+
=================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:13ab0febe972f77eb9af2cdb678d69c6648e34f3a8519c45acb04a816b4eb549
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fak--odoo--incubator-lightgray.png?logo=github
20+
:target: https://github.com/akretion/ak-odoo-incubator/tree/16.0/database_age_cron
21+
:alt: akretion/ak-odoo-incubator
22+
23+
|badge1| |badge2| |badge3|
24+
25+
This module adds a simple cron that allows to know easily what is the age of the database
26+
27+
You just have to check the `lastcall` date of the cron (via Odoo or via SQL)
28+
to know when it ran for the last time.
29+
30+
**Table of contents**
31+
32+
.. contents::
33+
:local:
34+
35+
Usage
36+
=====
37+
38+
To make it work, you will need to deactivate the cron once the database is not in production anymore.
39+
40+
For instance with a script that runs:
41+
42+
.. code:: sql
43+
44+
UPDATE ir_cron SET active='f' WHERE cron_name = 'Database Age Cron';
45+
46+
Bug Tracker
47+
===========
48+
49+
Bugs are tracked on `GitHub Issues <https://github.com/akretion/ak-odoo-incubator/issues>`_.
50+
In case of trouble, please check there if your issue has already been reported.
51+
If you spotted it first, help us to smash it by providing a detailed and welcomed
52+
`feedback <https://github.com/akretion/ak-odoo-incubator/issues/new?body=module:%20database_age_cron%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
53+
54+
Do not contact contributors directly about support or help with technical issues.
55+
56+
Credits
57+
=======
58+
59+
Authors
60+
~~~~~~~
61+
62+
* Akretion
63+
64+
Maintainers
65+
~~~~~~~~~~~
66+
67+
This module is part of the `akretion/ak-odoo-incubator <https://github.com/akretion/ak-odoo-incubator/tree/16.0/database_age_cron>`_ project on GitHub.
68+
69+
You are welcome to contribute.

database_age_cron/__init__.py

Whitespace-only changes.

database_age_cron/__manifest__.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "Database Age Cron",
3+
"summary": "Run a cron that determines database age",
4+
"version": "16.0.1.0.0",
5+
"category": "Uncategorized",
6+
"website": "https://github.com/akretion/ak-odoo-incubator",
7+
"author": " Akretion",
8+
"license": "AGPL-3",
9+
"application": False,
10+
"installable": True,
11+
"depends": [
12+
"base",
13+
],
14+
"data": [
15+
"data/cron.xml",
16+
],
17+
}

database_age_cron/data/cron.xml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<odoo>
3+
4+
<record id="database_age" model="ir.cron">
5+
<field name="name">Database Age Cron</field>
6+
<field name="interval_number">1</field>
7+
<field name="interval_type">minutes</field>
8+
<field name="numbercall">-1</field>
9+
<field name="priority">10</field>
10+
<field name="active">True</field>
11+
<field name="state">code</field>
12+
<field name="model_id" ref="base.model_base" />
13+
<field name="code">pass</field>
14+
</record>
15+
16+
</odoo>
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This module adds a simple cron that allows to know easily what is the age of the database
2+
3+
You just have to check the `lastcall` date of the cron (via Odoo or via SQL)
4+
to know when it ran for the last time.

database_age_cron/readme/USAGE.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
To make it work, you will need to deactivate the cron once the database is not in production anymore.
2+
3+
For instance with a script that runs:
4+
5+
.. code:: sql
6+
7+
UPDATE ir_cron SET active='f' WHERE cron_name = 'Database Age Cron';

0 commit comments

Comments
 (0)