Custom Schedulers

Custom Schedulers in Zoho Subscriptions let you schedule frequent tasks and provide you with various recurrence options like selecting the date, time and frequency, in which your tasks are executed.

Scenario: Peter runs a cloud-based software company and has set a monthly target of $1000, for everyone in his sales team. At the end of every month, he goes through the Sales by Salesperson report to make a list of the salespersons who’ve exceeded their targets, to congratulate them. With Custom Schedulers, he can schedule a custom task, which automatically sends him a list of all the salespersons who’ve achieved their targets at the end of every month. 

Note: This feature is available only in the Professional plan of Zoho Subscriptions.

Creating Custom Schedulers

To create a custom scheduler:

Warning: The start date of a scheduler cannot be more than one year from the date of creation.

Insight: Deluge (Data Enriched Language for the Universal Grid Environment) is an online scripting language that’s integrated with Zoho applications. It enables you to write your own functions to modify an application to suit your needs, making it more powerful and robust.

Now, your custom scheduler will execute the tasks based on your frequency settings.

Note: You can create a maximum of 10 custom schedulers.

Sample Function

Here’s an example of what a Deluge custom task would look like for the scenario above.

organizationID = organization.get("organization_id");
name = user.get("name");
userEmail = user.get("primary_email");
authtoken = "<ENTER AUTHTOKEN HERE>";
salesDetails = getUrl("" + organizationID + "&authtoken=" + authtoken + "&from_date=" + toStartOfMonth(today).toString("YYYY-MM-dd") + "&to_date=" + eomonth(today,0).toString("YYYY-MM-dd")).get("sales").toList();
salesPersonList = List();
for each  sales in salesDetails
salesPersonName = sales.get("salesperson_name");
amount = sales.get("sales_with_tax");
if(amount > "<ENTER AMOUNT>")
salesPersonMap = Map();
salesPersonMap.put("salesperson_name", salesPersonName);
salesPersonMap.put("amount", amount);

mailMessage = "Dear " + name + ",<br>";
mailMessage = mailMessage + "Here's a list of salespersons who achieved their monthly target. <br><br> SalesPersonName  -  Sales Amount (With Tax) ";
for each salesperson in salesPersonList
mailMessage = mailMessage + "<br> "+ salesperson.get("salesperson_name") +"  -  "+ salesperson.get("amount");
from :zoho.adminuserid
to : userEmail
subject :"Monthly Update: Sales Team Targets"
message : mailMessage

Was this document helpful?
Thank you for your feedback!
Want a feature?