Code Monkey home page Code Monkey logo

additional_scheduler's Introduction

additional_scheduler

Latest Stable Version Total Downloads TYPO3 TYPO3

Useful tasks in the scheduler module : full backup, send query result in mail as HTML or CSV, exec SH script with reports...

What does it do?

This extension add new process in your scheduler module, for example you can :

  • backup your entire TYPO3 website (with mail report)
  • exec a SH script (with mail report)
  • exec a SQL query with data put into a HTML table in an email
  • exec a SQL query with CSV as mail attachment (with options for separator, escaping, etc.)
  • clear caches
  • clear files in typo3temp older than x days

Do not hesitate to contact me if you have any good ideas.

This extension work with TYPO3 10.4.x-11.5.x.

Screenshots

List of all the tasks

backup your entire TYPO3 website (with mail report)

Configuration

Mail

exec a SH script (with mail report)

Configuration

Mail

exec a SQL query (with mail report and old templating)

Configuration

Mail

clear files in typo3temp older than x days

Installation

Download and install as TYPO3 extension.

Go to the scheduler module and enjoy it.

Changelog

See CHANGELOG.md

FAQ

I was in an interior version of 1.4 and all my tasks are broken, how can i do?

Run the dedicated migration command : typo3/sysext/core/bin/typo3 additionalscheduler:fixupdateto14

additional_scheduler's People

Contributors

apen avatar epoche-napoleon avatar gaumondp avatar marc-munos avatar schrej-zz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

additional_scheduler's Issues

BaseAdditionalFieldProvider::initFields() is called with null argument by sysext/scheduler when adding a new task

Adding a new task ( it works when modifying an existing one ) :
Argument 2 passed to Sng\Additionalscheduler\BaseAdditionalFieldProvider::initFields() must be an instance of TYPO3\CMS\Scheduler\Task\AbstractTask, null given, called in /var/www/public/typo3conf/ext/additional_scheduler/Classes/BaseAdditionalFieldProvider.php on line 105

since 1.5.7 :
protected function initFields(array &$taskInfo, AbstractTask $task, SchedulerModuleController $parentObject): void
instead of the pre 1.5.7 :
protected function initFields(array &$taskInfo, $task, SchedulerModuleController $parentObject): void

i'm on typo3 10.4.32, typo3 scheduler call additional_scheduler on ligne 604 of SchedulerModuleController.php :
$additionalFields = $providerObject->getAdditionalFields($taskInfo, null, $this);

BOM + date in CSV file name

Me again :)

Could you add a UTF-8 BOM mark to the CSV file to please the buggy but unfortunately unavoidable MS Excel :
CsvExportManager.php : 85

$handle = fopen($temp, 'w');
fputs($handle, $bom =( chr(0xEF) . chr(0xBB) . chr(0xBF) ));

also, the checkbox field of the BE task creation interface don't work : noHeader and noDatetimeFlag both revert to unchecked on save and don't apply to the resulting email. I think it has to do with data types, noDatetimeFlag";s:0:"" in the db, interpreted as an int in the code and tested with noDatetimeFlag === 0

additional_scheduler 1.5.9
Typo3 10.4.32 if it matters.

Thanks again for your time

Info about error

Hi there!

I use Typo3 Version 9.5.4,
ISP: Operating system: | Unix
PHP version: | 7.2.34-nmm1
PHP CGI detected: | No
scheduler | 9.5.4
additional_scheduler | 1.5.4

The "Scheduler test task" works fine and I get an email.
But a Backup-Task results to a red error-bar without further information.
No entries in the system log.

How can I find out?
Thanks in advance - Nicolas

Backup fails as of mysqldump access rights

At least I get an error when trying to backup.
The eMail notes the following error:
mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

Adding the parameter --no-tablespaces to the command in the shell script solved the issue.

PHP 7.4 compat

Hello, its me again :)

Some issue here as with additional reports. Just sayin'

Thanks for all your work, really appreciated.

Error when add new scheduler task

I get this error message when I try to add the scheduler task "Backup a website".
My config is...
TYPO3 10.4.10
PHP 7.3.25
Scheduler 10.4.10
In a Docker envirenmoent

Oops, an error occurred!
Call to protected method TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::addMessage() from context 'Sng\Additionalscheduler\BaseAdditionalFieldProvider'

composer.json


{
  "name": "apen/additional_scheduler",
  "type": "typo3-cms-extension",
  "description": "Useful tasks in the scheduler module : full backup, send query result in mail, exec SH script with reports...",
  "keywords": [
    "TYPO3"
  ],
  "authors": [
    {
      "name": "Yohann Cerdan",
      "email": "[email protected]",
      "role": "Developer",
      "homepage": "http://www.site-ngo.fr/"
    }
  ],
  "license": "GPL-2.0+",
  "require": {
    "typo3/cms-core": "^6||^7||^8"
  },
  "autoload": {
    "psr-4": {
      "Sng\\Additionalscheduler\\": "Classes"
    }
  }
}

Ajout http:// pour homepage + ^ devant les numéros de version
De plus pourriez-vous mettre votre projet sur packagist.org ? Cela éviterait le doublon sur un git / packagist interne.

Test Mail Setup

Hi,

what about an scheduler task to test the mail setup on regulary base?

In rare cases the given data didn´t work anymore, i. e. changes on the hosters side. So it would be great to get information, if that happens, because not working forms are a big problem.

Problem: how to inform the admin, if mailing is defect?! Maybe browser notification at the next login or entry in the be-syslog?

Best regards,
Chris

Tag 1.5.10

Hi,

Little special request : could you publish a 1.5.10 tag at commit c463bcd as the last typo3v10 version ?

Thanks

Cannot create task

Hello! I have version 1.5.9 installed and I wanted to create the Back up a website task. But no matter what I try, I get an empty error message:

Bildschirmfoto 2023-05-17 um 11 59 28

Following error appears in the log:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: strftime() expects parameter 2 to be int, string given | TypeError thrown in file /home/.sites/53/site5845083/web/typo3_src-11.5.16/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php in line 701. Requested URL: http://www.lilawinkel.at/typo3/module/system/txschedulerM1?token=--AnonymizedToken--&CMD=add

I found it only once, so it might be due to other tries of me.

Do you know what is happening?

Thanks in advance!

security

Hello,
I'd like to report a possible security issue. How can I get in touch?

Variable for backup path

Hi,
are you able to implement the usage of a variable in the backup path, so that the directory of the backup can be made dependent eg. from production state.

Example: I have 3 Typo3 versions of Typo3 running (DEV/Test/Production).
Im copying the files and DBs from one version to the other from time to time.
As the backup path of the extension is in the database, the backups of the 3 versions are overwriting each other.
This can be prevented by the usage of a variable in the path.
Or is this already possible in some way?

Support TYPO3 11

Hello, is there any support for TYPO3 11 planned?

At the moment this extension only supports version 8, 9 and 10.

Thanks. Philipp

Backup script ignores Environment::getContext

I have 3 Typo3 installations (DEV/Test/Production).
The backup script reads the DB data (DB name, User, etc.) out of the file LocalConfiguration.php and ignores the definitions in AdditionalConfiguration.php.
Therefore no matter in which installation I am in, only the DB definded in LocalConfiguration.php is backuped.
Either

  • the extension also hands over the Environment::getContext to the script and also analyzes AdditionalConfiguration.php (which seems more complex to me) or
  • the neccessary DB data are read within the extension and handed over to the script instead of reading them out of LocalConfiguration.php

Not working: Backup gives "export_" file

I cannot do a backup with your extension. In the backup folder a "export_" file is generated. This is the log-email:

/home/strato/http/premium/..../typo3conf/ext/additional_scheduler/Resources/Shell/save_typo3_website.sh -p /home/strato/http/premium/.../ -o /home/strato/http/premium/.../backup/ -f

Thu Jul 26 09:03:18  2018
Checking dependencies...Succeeded.
-----------------------------------------------------------------------
Informations
-----------------------------------------------------------------------
Date               : 20180726
Website size       : 823M	
Size of the DB     : 0M
TYPO3 version      : 8.7.17
PATH_site          : /home/strato/http/premium/...
Tar file           : /home/strato/http/premium/.../backup/export_                'dbname' => 'DB299xxxx',-20180726.tar.gz
SQL file           : export_                'dbname' => 'DB299xxxx',-20180726.sql
-----------------------------------------------------------------------
Check informations in 'typo3conf/LocalConfiguration.php'
-----------------------------------------------------------------------
typo_db_host       :                 'host' => 'rdbms.strato.de',
typo_db_username   :                 'user' => 'U299xxxx',
typo_db            :                 'dbname' => 'DB299xxxx',

-----------------------------------------------------------------------
Dump the DB                 'dbname' => 'DB299xxxx',...
-----------------------------------------------------------------------
/home/strato/http/premium/.../typo3conf/ext/additional_scheduler/Resources/Shell/save_typo3_website.sh: line 264: $filenamesql: ambiguous redirect
/home/strato/http/premium/.../typo3conf/ext/additional_scheduler/Resources/Shell/save_typo3_website.sh: line 265: $filenamesql: ambiguous redirect
-----------------------------------------------------------------------
Compress the files and DB...
-----------------------------------------------------------------------
tar: 'dbname': Cannot stat: No such file or directory
tar: =>: Cannot stat: No such file or directory
tar: 'DB299xxxx',-20180726.tar.gz: Cannot stat: No such file or directory

Thank you for your help!

MailUtility::getSystemFrom() returns null || indexed array || assoc array

Hi,

I had a problem with the "Execute a schell script" task, when sendEmail() function of Utils.php gets :
$from = MailUtility::getSystemFrom();
it can get null if $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] is not set or $from[0] can be null if $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] is set. In both cases, the task fail with an exception.

It can be fixed with this as the begining of the sendmail function :


        if ( $from === null ) throw new \RuntimeException( 'System email is not configured', 165282396 );
        $fromAdress = key($from);
        if ( is_numeric($fromAdress) ) $fromAdress = $from[0];

        $mail = GeneralUtility::makeInstance(MailMessage::class);
        if (version_compare(TYPO3_version, '10.4.0', '>=')) {
            $mail
                ->from(new Address($fromAdress))

Exception when executing a shell script

Hi,
after updateting to 10.4.x and additional_scheduler 1.5.6, I get the following exeption when executing a shell script:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to Symfony\Component\Mime\Address::__construct() must be of the type string, null given, called in /homepages/11/d582349469/htdocs/xxx/htdocs/typo3conf/ext/additional_scheduler/Classes/Utils.php on line 61 | TypeError thrown in file /homepages/11/d5823494yy/htdocs/typo3_src/typo3_src-10.4.21/vendor/symfony/mime/Address.php in line 42. Requested URL: https://www.xxx.de/typo3/index.php?route=%%2Fmodule%%2Fsystem%%2FtxschedulerM1&token=--AnonymizedToken--&tx_scheduler[execute][]=15

This worked with 9.5.x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.