Introducing support for Scheduling OCI Functions

October 7, 2024 | 4 minute read
Kay Singh
Principal Product Manager
This is a syndicated post, view the original post
Text Size 100%:

We're excited to announce the launch of our new Functions scheduling feature, designed to give you unprecedented control and flexibility over when to trigger your Functions. Scheduling a Function has been one of the top-customer asks for use-cases such as periodic ops tasks such as backups, security checks as well as file-processing and batch jobs.

Why Schedule Your Functions?

Scheduling Functions opens up a world of possibilities for optimizing your serverless applications. Here are some key benefits and use cases:

  1. Automated Maintenance and Housekeeping - Schedule Functions to perform regular maintenance tasks such as database cleanup, log rotation, data archiving, cleanup of expired sessions in your application's cache or monthly archiving of audit logs to long-term storage. This ensures your systems stay optimized without manual intervention.
  2. Periodic Data Processing and Analytics - Run data processing or analytics jobs at set intervals. For example, generate daily reports, update dashboards, aggregating IoT sensor data every hour for trend analysis or process batched data on a schedule that suits your business needs.
  3. Periodic Backend Operations - Schedule backend operations like cache warming, content updates, or inventory checks to run during off-peak hours, syncing product catalogs and inventory across e-commerce platforms nightly ensuring smooth performance during high-traffic periods.
  4. Machine Learning and AI - Schedule model retraining with new data to improve accuracy and performance, run periodic inference tasks at scheduled times to generate predictions or recommendations or evaluate model performance daily by monitoring key metrics, detect drift, and triggering alerts if performance drops below thresholds.
  5. Compliance and Auditing - Automate compliance checks or auditing processes to run at regular intervals, ensuring your systems consistently meet regulatory requirements like HIPPA or GDPR.
  6. Seamless Integration with Business Processes - Align your Function executions with your business processes such as month-end financial close procedures, weekly payroll calculations or daily close of business inventory reorder calculations.
  7. Automated Backups and Disaster Recovery - Schedule regular backups of your data or system configurations. This can be crucial for maintaining business continuity and disaster recovery preparedness.
  8. Scheduled API Polling - For APIs that don't support webhooks, schedule Functions to poll these APIs at regular intervals, keeping your data in sync without the need for constant manual checks. For example:
    1. Polling a partner's inventory system every 15 minutes during business hours
    2. Fetching updated exchange rates from a financial API four times a day
    3. Retrieving the latest weather data for multiple locations every 30 minutes
  9. Time-based Security Scans - Schedule security scans and vulnerability assessments to run automatically, helping to maintain a robust security posture without constant manual oversight.For example:
    1. Perform weekly scans of your Compute instances for known vulnerabilities
    2. Check Object storage bucket access policies and encryption settings every hour
    3. Analyze Audit logs for suspicious activity patterns each night
  10. Seasonal or Time-sensitive Operations - Easily manage seasonal business logic or time-sensitive operations. For example, automatically update pricing during sale periods, or change website content for holidays or special events.

Key Features

This capability is enabled by the recently launched OCI Resource Scheduler service which offers the following capabilities.

  1. Cron Syntax Support: For those familiar with cron jobs, you can now use the same syntax to schedule your Functions.
  2. Form-based Interface: Not comfortable with the cron syntax? No problem. Our intuitive form-based interface allows you to schedule functions at hourly, daily, weekly or monthly intervals.
  3. Multi-Function Scheduling: Need to run multiple Functions on the same schedule? Resource Scheduler allows you to easily assign the same schedule to multiple Functions, streamlining your resource management.

Try it yourself

You can enable your first scheduled Function by following the below instructions:

  1. Navigate to Governance & Administration section in the Oracle Cloud Console, where you can find the Resource Scheduler service.
  2. Click on the “Create a schedule” button
  3. Choose “Start” as the action to be executed. This will be used to trigger the Function.
  4. On the Resources tab, select the Function filter
  5. Then select the granularity and time when the Function needs to be triggered.
  6. And finally create the Schedule! 
  7. Next, create the necessary IAM policies that will allow a Schedule to trigger the Function. This includes adding the just created schedule to a Dynamic Group and giving the Dynamic Group access to manage Functions. The exact details of policies needed can be found in the documentation link below.

Pricing & Availability

There is no charge for creating a schedule. This feature is now available in all the regions in OC1 realm and will roll out to other realms over the upcoming months. For more information on OCI realms and regions, see the following documentation link.

Documentation

Additional details on this feature can be found at the below link:

https://docs.oracle.com/iaas/Content/Functions/Tasks/functionsschedulingfunctions-about.htm

Kay Singh

Principal Product Manager

Kay is currently responsible for the Functions and Code Assist products. In his past roles at OCI, Kay has defined the strategy for services like Monitoring, Notifications, Dashboards and Connector Hub. Before OCI, Kay was a Product Manager at Microsoft Azure primarily solving challenges in the Compute and Storage infrastructure layers. 

Oracle Chatbot
Disconnected