Scheduled Tasks

Scheduled tasks allow you to run reports unattended at defined schedules within the myDBR application.

Things you can do with scheduled tasks:

Configuration

To run scheduled tasks, create an entry for myDBR in your job scheduler (e.g., cron in Unix/Linux, Task Scheduler in Windows) to call scheduler.php. A sample entry running every half an hour:

  0,30 * * * * /opt/local/bin/wget -O - -q -t 1 https://myserver.com/mydbr/scheduler.php > /dev/null 2>&1

scheduler.php looks for jobs within myDBR that need to be executed. Set the interval based on your requirements. If no tasks need to be run, resource usage is minimal, and tasks are run sequentially.

Configure the scheduled tasks environment under "Environment settings" / "Scheduled tasks". Define a local myDBR user to run reports and specify IPs allowed to call scheduler.php. Example:

To configure scheduled tasks, go to "Admin Tools" / "Scheduled tasks" and add tasks. Tasks are cron-type interfaces defining which report runs at specific times. Report execution aligns with the job scheduler's defined intervals. Disable tasks if needed.

Troubleshooting Scheduled Tasks

For troubleshooting scheduled tasks, add ?debug=1 at the end of the scheduled tasks URL and access the URL for detailed debug information.

  /opt/local/bin/wget -qO- "https://myserver.com/mydbr/scheduler.php?debug=1"

Fixing Certificate Issues

If you encounter an SSL error like "SSL certificate problem: unable to get local issuer certificate", ensure PHP is configured to handle certificates:

  1. Download the CA certificates (cacert.pem) from https://curl.haxx.se/docs/caextract.html
  2. Place cacert.pem on the server
  3. Update php.ini entries:
    curl.cainfo="/path/to/cacert.pem"
    openssl.cafile="/path/to/cacert.pem"
  4. Restart PHP