Doubt with the scheduler plugin

I’m using scheduler to execute every day a procces at the 7 am. This proces add some records in one database, the point is when execute the process, send an email to me and other person saying the process is done, because we can know the process execute and the server not is shutdown or something else.

But my problem is the proces execute the days 14, 17 and 20 of setember, but no the 15, 16, 18 and 19. And i don’t know why. This is the line of the cronjob:

plugins.scheduler.addCronJob('Test', '0 0 7 * * ?', updateData)

And this is the method updateData:

function updateData() {
	/**@type {JSFoundset<db:/infoathand/accounts_cstm>}*/
	var accCstm = databaseManager.getFoundSet("infoathand", "accounts_cstm");
	accCstm.loadRecords();
	accCstm.find();
	accCstm.msi_sales_agent_c = "!^=";
	accCstm.search();
	var foundsetCount = databaseManager.getFoundSetCount(accCstm);
	for (var i = 1, accountsCstmFsLength = accCstm.getSize(); i <= foundsetCount; i++) {

		var selectedRecord = accCstm.getRecord(i);
		var addNewRecord = true;
		if (selectedRecord.accounts_cstm_to_bamboo.getSize() > 0) {
			selectedRecord.accounts_cstm_to_bamboo.sort("bamboo_fecha desc");
			var bambooRecord = selectedRecord.accounts_cstm_to_bamboo.getRecord(1);
			if (bambooRecord.assigned_user == selectedRecord.accounts_cstm_to_accounts.accounts_to_users.user_name && bambooRecord.status_c == selectedRecord.status_c) {
				addNewRecord = false;
			}
		}

		if (addNewRecord && selectedRecord.accounts_cstm_to_accounts.getSize()) {
			/**@type {JSFoundset<db:/bamboo/bamboo>}*/
			var bambooFs = databaseManager.getFoundSet("bamboo", "bamboo");

			var newRecord = bambooFs.getRecord(bambooFs.newRecord());

			newRecord.id_c = selectedRecord.id_c;
			newRecord.msi_sales_agent_c = selectedRecord.msi_sales_agent_c;
			newRecord.status_c = selectedRecord.status_c;
			newRecord.bamboo_fecha = new Date();
			newRecord.assigned_user = selectedRecord.accounts_cstm_to_accounts.accounts_to_users.user_name;
			databaseManager.saveData(newRecord);
		}
	}
	var properties = [];
	properties.push('mail.smtp.host=localhost');
	properties.push('mail.smtp.port=25');
	properties.push('mail.smtp.auth=true');
	properties.push('mail.smtp.username=servicios@viewtech.es');
	properties.push('mail.smtp.password=P4b266Services');
	
	var hora = utils.dateFormat(new Date(), "HH:mm");
	var dia = utils.dateFormat(new Date(), "dd/MM/yyyy");

	var subject = "[PMSI]: Notificación de ejecución correcta del proceso 'Bamboo'";
	var msg = "Le informamos que la Base de Datos de Bamboo Media ha sido correctamente actualizada a las " + hora + " del " + dia + ". Se puede ejecutar el informe en cualquier momento."
	var success = plugins.mail.sendMail('x.romeu@pentamsi.com, s.decandelario@pentamsi.com', 'info@pentamsi.com', subject, msg, null, null, null, properties);
}

And if you see, ever had to send an email, but i don’t know why the email is sending only when update the database.