Re: If the field 'Run As' is blank for a scheduled job, which user credential will be used to run the Scheduled job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 04:56 AM
Hi Ruchi,
The reason why I asked this is that I could find that there is a scheduled job named 'Import Set Deleter' which is not able to clean the records from sys_import_set_row table.
Script:
var ic = new ImportSetCleaner();
// delete import sets and their related import set rows
// that were created more than or equal to 7 days ago
ic.setDaysAgo(3);
ic.clean();
I have run this scheduled job and could not see any difference in the number of records.
May be there is something which is missing here. Can you please help.
Regards,
Avinash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 05:12 AM
I just tried the same scheduled job with the below query and it has cleaned up all the records from "sys_import_set".
var ic = new ImportSetCleaner();
// delete import sets and their related import set rows
// that were created more than or equal to 0 days ago
ic.setDaysAgo(0);
ic.clean();
Do you have records created before 3 days?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 05:37 AM
Hi Ruchi,
Thanks for being so prompt.
Yes it cleaned up the sys_import_set table and we do not have anything prior to three days left under it.
But all the records under the table sys_import_set_row still remain there.
I can see that there is a foreign key relationship between these two tables. So when I delete the records from sys_import_set table, it should ideally remove all the records from sys_import_set_row which have a foreign key relationship with the deleted records in sys_import_set table. This is possible only when the relationship does not have ON_DELETE_CASCADE on.
Can you also check your sys_import_set_row table and see if the records are getting deleted.
We are at Apsen Version. Please specify your version as well. If this does not delete the records in the sys_import_set_row table, it is a possible product bug.
Regards,
Avinash