Hello, we are on Apps10 and I have been looking for a good definition of what the background job Light Cleanup does. Ours runs every 10 minutes and has for years. The job is listed in the “Configure scheduled tasks” page in the help but it only lists a few tasks that it performs. We currently have another job called “Background job cleanup” running nightly but this job may be obsolete and Light Cleanup deletes old background jobs after our 7 day interval defined in system parameters.
We recently ran into a problem with light cleanup ending in error due to a problem with a materialized view, so it appears it recompiles materialized views with errors also. Can I get a complete list of what Light Cleanup does?
runs the following query where the parameter could be in ('KEEP_DEFJOBS','KEEP_DEFJOBS_WARNING','KEEP_DEFJOBS_ERROR','Error') but in Number
SELECT value INTO temp_ FROM fnd_setting_tab WHERE parameter = parameter_;
It will be something like this
select value FROM fnd_setting_tab WHERE parameter = 'KEEP_DEFJOBS_WARNING';
SELECT value FROM fnd_setting_tab WHERE parameter = 'KEEP_DEFJOBS_WARNING';---- 30
select value FROM fnd_setting_tab WHERE parameter = 'KEEP_DEFJOBS';----- 7
select value FROM fnd_setting_tab WHERE parameter = 'KEEP_DEFJOBS_ERROR';---180
select value FROM fnd_setting_tab WHERE parameter = 'ERROR';
All of them return a varchar as a number but the T0_NUMBER will parse the data to Number into the tnum variable.
After that the =>
Transaction_SYS.Cleanup__(tnum_, ''); Start removing the old background job Transaction_SYS.Cleanup_Executing__; to execute the clean
I was wondering about the following lines inside the TRANSACTION_SYS.CLEANUP()
General_SYS.Check_Security(service_, 'TRANSACTION_SYS', 'Cleanup__'); OPEN get_recs; LOOP FETCH get_recs BULK COLLECT INTO trans_id_ LIMIT 1000; FORALL i_ IN 1..trans_id_.count -- Remove old background jobs DELETE FROM transaction_sys_local_tab WHERE id = trans_id_(i_);
FORALL i_ IN 1..trans_id_.count -- Remove status rows DELETE FROM transaction_sys_status_tab WHERE id = trans_id_(i_); -- Commit to avoid snapshot too old error --@ApproveTransactionStatement(2013-11-08,haarse) COMMIT; EXIT WHEN get_recs%NOTFOUND; END LOOP;
The limit is set up to 1000. I am wondering you have more than 1000.
Please, do not do any change to the code directly. I am giving an opinion. I am not a IFS employee with experience directly into the application. I was reading all the code created to remove the old background job.
You should probably open an IFS ticket they can guide you in how to fix the issue.
I hope this help!
Thanks,
JL
Hello JGOTA, thanks for the quick response! I am actually not a technical person but I think I see what it’s doing: you can have different deletion intervals set for jobs in state “ready” vs. error and warning and this is based on the system parameters. The background jobs are currently getting cleared in PROD as expected but I was wondering if it is Light Cleanup that is doing it and it appears it is. I think the job “background job cleanup” that we have scheduled is obsolete and we can disable it. I’ll test it first.
I’m not interested in changing code, I just wanted a better list of what all light cleanup does and this answers part of that.
Mary
Hi @reimccabe Light cleanup removes data from Background Jobs, Foundation1 Session information and replicates IAL objects.
The Light Cleanup process will remove Background jobs in state Ready, Warning and Error unless they are marked to be excluded from cleanup.