Advertisement

Running Admin functions with a CRON job.

General questions relating to Joomla! 5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2727
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Running Admin functions with a CRON job.

Post by JAVesey » Sat Nov 09, 2024 11:25 am

Probably a silly questions but here goes…

I use a well-known administration component, one of whose functions is to clear the sessions table. I run it manually every few days. The component is only available in /administrator to Super Users.

If I were to set a CRON job on the server to run the URL of the clear sessions table function, would it actually run given that the component is only available to logged in Super Users?
John V
Cardiff, Wales, UK
Joomla 5.2.2 "live" site on PHP 8.3.2 and MariaDB 10.11.10 (with b/c plugin enabled)
Joomla 5.2.2 on MAMP Pro 7.1.3 with PHP 8.3.9 and MySQL 8.0.35 (with b/c plugin enabled)

Advertisement
SharkyKZ
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3104
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Running Admin functions with a CRON job.

Post by SharkyKZ » Sat Nov 09, 2024 1:33 pm

No, unless it explicitly supports that or has vulnerabilities allowing unauthorized users to execute admin functions. If you need to delete expired sessions, set up Session Data Purge scheduled task.

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2727
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: Running Admin functions with a CRON job.

Post by JAVesey » Sat Nov 09, 2024 2:55 pm

SharkyKZ wrote: Sat Nov 09, 2024 1:33 pm No, unless it explicitly supports that or has vulnerabilities allowing unauthorized users to execute admin functions. If you need to delete expired sessions, set up Session Data Purge scheduled task.
Thank you :)
John V
Cardiff, Wales, UK
Joomla 5.2.2 "live" site on PHP 8.3.2 and MariaDB 10.11.10 (with b/c plugin enabled)
Joomla 5.2.2 on MAMP Pro 7.1.3 with PHP 8.3.9 and MySQL 8.0.35 (with b/c plugin enabled)

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31397
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Running Admin functions with a CRON job.

Post by Per Yngve Berg » Tue Nov 12, 2024 12:13 pm

Set php/file system as Session Handler instad of Database in Global Configuration. The Server have a Cron Job that clears Session that was installed with php.

Advertisement

Post Reply

Return to “General Questions/New to Joomla! 5.x”