hi!
I am trying to create a simple batch process that will insert records in my table
function batchprocessinsert_onOpen() {
// add a job that runs every day at 4:10pm and every 5mins
var dateNow = new Date();
plugins.scheduler.addCronJob('registrationcleanup', '0 10/5 16 ? * *', globals.insertRecord(), dateNow)
}
function insertRecord() {
var signupFS = databaseManager.getFoundSet(DB_SERVER_NAME, "signup")
signupFS.newRecord();
signupFS.effectivedate = new Date();
databaseManager.saveData(signupFS)
}
deployed the solution.
Create a new batch process
Solution: batchprocessinsert
I did not set any arguments, username and password.
Clicked Add
Clicked Start
status: Is running
I did not see any records in my table.
Is the username and password required? I do not have a login form in my solution.
var signupFS = databaseManager.getFoundSet(DB_SERVER_NAME, "signup")
signupFS.newRecord();
signupFS.effectivedate = new Date();
databaseManager.saveData(signupFS)
}
Are you sure that DB_SERVER_NAME contains a valid value?
Anyway first thing is to check the log to see if the method runs, you could also fire some application.output() when you init the cronjob and when you run the method so you can check the server log to see what happens.