Skip to content

Commit f485a42

Browse files
committed
MIG database_age_cron
1 parent b3ce2e5 commit f485a42

File tree

7 files changed

+529
-0
lines changed

7 files changed

+529
-0
lines changed

database_age_cron/README.rst

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