In our database data from tables
To create the jobs you can log into SQL Server Management Studio as the 'sa' user and run the following:
use <database name>
It is worth noting that if you are using SQL Server Express that it does not have the SQL Server Agent that will run these (unless you manually installed the Primavera Background Agent or are on P6r8.2/8.3 where it no longer requires SQL Server Agent)
To bring it up-to-date I recommend running the following however many times you need for it to clean up the data until it is current to within the last month.
You can run multiple so having the below is perfectly fine.
They usually clean up two weeks worth each so you will probably need to run it ~150 times.
When you get closer to the end it should only take 10-15seconds for each run, I wouldn't be surprised if the first 50 or more take about 10minutes each.
It should run on a schedule automatically, I believe DAMON runs once a week.
If you do need it to run more often then the below example will change it to run every 30minutes
UPDATE settings SET setting_value='30m' where namespace = 'database.background.Damon' and setting_name='Interval';