SCHEDULE

CAS Tags
The SCHEDULE integer tag appears in taglists prepared for the SEND_MESSAGE and MODIFY_MESSAGE functions, and in message taglists returned from the GET_Q_ENTRIES_INFO function.  This tag specifies the date and time when a message in the server's send queue becomes eligible for delivery.  The actual delivery time may occur after the SCHEDULE time, based on availability of fax ports.  When the SEND_MESSAGE function is called, if a SCHEDULE time is not provided, or is set for a time earlier than the current time, the new message will become immediately eligible for delivery. 

The integer value of the SCHEDULE tag represents the number of milliseconds in Coordinated Universal Time (UTC) between midnight January 1, 1970 and the scheduled time.  Before assigning a value to the SCHEDULE tag, ensure that time relevant to a local time-zone is converted to UTC.

 
  Type Max Size Multiple Allowed
Integer 8 bytes No

Example:
function SendFaxCover()
  {
  var Tl, Sl, StatusNum;
  
  Tl = CAS.New();
  CAS.AddTag(Tl,"SEND_MESSAGE","");
  CAS.AddTag(Tl,"REGISTERED_NAME",UserName);
  CAS.AddTag(Tl,"REGISTERED_PASSWORD",UserPassword);
  CAS.AddTag(Tl,"TRANSFER_TYPE",0);  // 1= EMAIL, 0=FAX
  CAS.AddTag(Tl,"SUBJECT","Subject");
    // Use JavaScript to set the schedule for
    // November 7, 2002 at 2:45 PM
  CAS.AddTag(Tl,"SCHEDULE",(new Date(2002,10,7,14,45)).getTime());

  Sl = CAS.CreateSection(Tl,"RECEIVER_ADDRESS","555-123-1234");
    CAS.AddTag(Sl,"RECEIVER_NAME","Recipient");
  CAS.CloseSection(Sl);
                  
  Sl = CAS.CreateSection(Tl,"CONTENT_PART",2);  // Cover Message
    CAS.AddTag(Sl,"CONTENT_TYPE",1);            // File Type ASCII
    CAS.AddTag(Sl,"CONTENT_DATA","This is my cover text!");
  CAS.CloseSection(Sl);

    // Send message on this already open session
  Tl = CAS.Send(cInst,Tl);
  StatusNum = parseInt(CAS.GetTag(Tl,"STATUS_NUM",0));
  CAS.Delete(Tl);
  
  return(StatusNum);
  }

See Also:
SEND_MESSAGE, MODIFY_MESSAGE, GET_Q_ENTRIES_INFO, SUBMIT_TIME