Buildin periodic tasks + in custom module

Hi guys,

I’m creating my custom module to view some info that it saves through a Scheduled Tasks. My question is can I install the cron Scheduled Task directly during the module installation, or do I have to do it manually?

Now I install the scheduled tasks in custom/Extension/modules/Schedulers/Ext/ScheduledTasks/ !!

Beyond this I wanted to know if it was always possible during the installation phase of the custom module, to add relations for example to the prospect / targets table already present in suitecrm, This always to avoid having to do it manually every time you do a new installation of suitecrm!

Hi, welcome to the Community! :tada:

If you create a Module Loader package, you can do all that.

If you add the necessary files for the Scheduled job, you will effectively install it. And if your vardef changes cause fields or relationships to be created, they will take effect when people run a Quick Repair and Rebuild, and run the queries proposed by SuiteCRM right from that screen.

Have a look at this to help you create those packages:

@pgr thanks for reply, in fact I could copy the file by setting them in the manifest e.g

'copy_files' => array (
    'from_dir' => '<basepath> / custom /',
    'to_dir' => 'custom', 
    'force_copy' => array ( ),

right? (The problem, however, is that if I modify the module and then compress it in the zip format it tells me that it cannot find the manifest file)

Instead to modify the fields or add new ones in the already existing tables in suitecrm what should I specify in the vardefs ?

What’s that about zipping? Are you using Module Builder or Studio or plain PHP?

Read about the vardefs extensions:

I exported the module from module builder and edit the dateailview file to add the link on a field other than the default one (because from Module Builder or Studio I can’t do it)

and then I zipped it manually!