Automation Overview

Automate workflows and tasks with Weik.io

Weik.io Automation runs repetitive tasks on a schedule or in the background, removing the need for manual execution.

What is automation?

Automation runs your code when you need it to run. This covers:

  • Scheduling recurring tasks (for example, nightly data syncs)
  • Running background jobs that process queues
  • Coordinating system maintenance

Core components

Scheduled tasks

Scheduled tasks run on a cron schedule. Use them for:

  • Periodic data synchronization
  • Generating daily or weekly reports
  • Batch processing
  • Cleaning up old logs or temporary data

See Scheduled Tasks for details.

Webjobs

Webjobs run continuously or on a schedule. They are built for:

  • Long-running processes that shouldn’t time out
  • Continuous monitoring loops
  • Service workers processing messages from a queue

Real-world examples

Scheduled data sync

Synchronize data between systems on a nightly schedule:

Scheduled Task (daily at 2 AM)
  → Integration (fetch data from API)
  → Integration (transform data)
  → Integration (store in database)

Monitoring and alerts

Check system health automatically instead of watching a dashboard:

Scheduled Task (every 5 minutes)
  → Integration (check system health)
  → Integration (evaluate thresholds)
  → Integration (send alert if something broke)

Supported languages

You can write scripts in the following languages:

  • C# - Full .NET support
  • Python - Suitable for data processing and custom packages
  • PowerShell - Standard Windows automation
  • JavaScript - Node.js execution

Error handling

Automation tasks can fail because of API outages, corrupted data, or network timeouts.

  • Add try-catch blocks to your scheduled tasks.
  • Build retry logic for operations that fail intermittently.
  • Set up alerts so that failing jobs are detected quickly.

Security

  • Credentials: Store secrets in variables instead of hardcoding them in scripts.
  • Permissions: Restrict who can edit automation workflows.
  • Audit logging: Check the logs to see who changed a schedule or edited a script.
  • Isolated execution: Scripts run in a sandbox, isolated from the rest of the system.

Monitoring and logs

When a task fails, use the monitoring tools to find out why:

  • Check execution history and success rates.
  • Watch for jobs whose execution time increases significantly.
  • Review error logs and stack traces.

How it connects

Automation connects to the rest of the platform:

  • Events - Start tasks based on system events
  • Integration Flows - Run your flows on a set schedule
  • Variables - Read configuration values dynamically
  • Agents - Hand off execution to remote agents

Best practices

Keep tasks focused Avoid writing a single large script that syncs data, cleans the database, and sends an email. Split it into separate tasks so that when one fails, the others still run.

Log useful information Log when a task starts and stops, and include IDs for the records being processed. This makes failures easier to debug.

Handle errors gracefully Do not catch an error and silently ignore it. Fail loudly for critical errors, or implement retry logic for unreliable third-party APIs.

Test with real data Test your scripts against a staging environment that mirrors production.

Next steps