     now = MailButler.DB.now()
     user = MailButler.getEmail()
     lastScheduled = MailButler.DB.getLastScheduled user
+
+    MailButler.log "Trying to schedule: #{JSON.stringify(form)}"
     
     # Get a lock for the current user
     lock = LockService.getPrivateLock()


    user = @getEmail()
    time = d.getTime()
    MailButler.log "With user '#{user}', version '#{@VERSION}' and time #{time}"
    result = @DB.getMails user, @VERSION, time, false

    if (s = result.getSize()) > 0

  try
    if lock.tryLock 10000
      # wait 10 seconds at most
      # MailButler.log 'We have the lock...'
      try
        if MailButler.isEnabled()
              # Get the time this scheduled execution started
