View Categories

Planned tasks

2 min read

On linux server edit cron of eac user:

crontab -e -u eac

1. Status Purge – on main server only

To clean up old memory and cpu usage on servers. We recommended retention of 4 days:

0 0 * * * {path_to_php} /var/www/html/bin/console eac:server-status:purge --days=1 >> /var/www/html/var/log/eac-master-server-status-purge.log 2>&1

Replace {path_to_php} by the full path to php. For example: /usr/bin/php

2. Deployment Verification – on all servers

When a job version is deployed in EAC, each execution servers must retrieve and keep a local copy of that version.
This scheduled verify that every execution server holds the correct copy; if not, EAC shows a visual alert and avoids launching an execution on any out-of-sync server.

0 1 * * * {path_to_php} /var/www/html/bin/console eac:check-jobversion-deployment --force >> /var/www/html/var/log/eac-master-check-jobversion-deployment.log 2>&1

Replace {path_to_php} by the full path to php. For example: /usr/bin/php

3. Check executions are still alive – on all servers

This schedule allow to kill all executions with status « IN PROGRESS » which no longer have any os pid running on the system.

* * * * * {path_to_php} /var/www/html/bin/console eac:check-background-task  --secondsToConsiderOutdatedAndKill=90 --secondsToConsiderOutdatedAndReaffectServer=10 >> /var/www/html/var/log/eac-master-check-background-task.log 2>&1

Replace {path_to_php} by the full path to php. For example: /usr/bin/php

You can adjust options

  • secondsToConsiderOutdatedAndKill: reduce or increase the number of seconds after what an execution with the status « SENT TO QUEUE » is considering oudated because on server is available to launch it.
  • secondsToConsiderOutdatedAndReaffectServer: reduce or increase the number of seconds to reaffect a task to an available server

4. Enable scheduler – on main server only

If you schedule tasks on EAC you need this to launch task on time.

* * * * * {path_to_php} /var/www/html/bin/console eac:scheduler --planForTheNextInSeconds=90 >> /var/www/html/var/log/eac-master-scheduler.log 2>&1

Replace {path_to_php} by the full path to php. For example: /usr/bin/php

You can adjust option « planForTheNextInSeconds » to provision tasks to be launched more or less than the next 90 seconds.