The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Cron Manager - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Modifications and Hackery (https://userspice.com/forums/forumdisplay.php?fid=29)
+--- Thread: Cron Manager (/showthread.php?tid=660)

Pages: 1 2 3


Cron Manager - Brandin - 08-05-2017

Hello all!

I have put a lot of work into my Cron Manager and finally have it done! I will include it and a few of the crons I run for you to use if your heart so desires Smile I use my cPanel Cron Manager to run the script daily at 4:30am.

Cron Table SQL:
https://pastebin.com/9KbensmM

Code:
cronmanager.php
to be placed in usersc
https://pastebin.com/DkHjWxnk

Code:
cronpost.php
to be placed in usersc
https://pastebin.com/7nW2WxKi

Code:
cron.php
to be placed in the root folder in
Code:
cron
https://pastebin.com/hJFsS9UD

**PLEASE ADD /cron IN z_us_root.php**ALL FILES IN THIS DIRECTORY SHOULD BE PUBLIC**

JS:
Code:
bootstrap-editable.js
https://pastebin.com/G4vuQY9A
Code:
jwerty.js
https://pastebin.com/ngMRCMBd

Here is an automated process of the automated Backup function by @Firestorm:
https://pastebin.com/pBA7bUBb to be placed as
Code:
backup.php
in /cron

Add it to the cron from your cron manager page.

When adding crons only include the file name, do not include the directory, it assumes /cron, e.g. for /cron/backup.php just put "backup.php"

I think that is it. For the most part if you add a cron file, you just need to worry about adding this at the end:
https://pastebin.com/N1H52NpX

Let me know if you have any questions or run into any issues Smile


Cron Manager - firestorm - 08-05-2017

hmm like the idea of the automated backups Smile


Cron Manager - Brandin - 08-05-2017

It's my favorite! I hope you like it! Kudos to you for the hard work on the actual system, I just copied your code Wink


Cron Manager - karsen - 08-05-2017

Cronjobs are much farther down on my to-do list, but maybe I can cross it off sooner than I thought. I'll see if I can adapt your code to my system (I was also looking at Firestorm's). Thanks!


Cron Manager - Brandin - 08-05-2017

Let me know how it goes and if you run into any problems! I put my cron jobs off for so long...I had one audit query to remove duplicate logs because our users click a copy button that I was using to track stacks and they were double...triple...quad clicking...finally added the cron job and found out my reports were ~ 4000 results off!!!!! Better sooner than later if you do any kind of reporting or anything from your project!


Cron Manager - mudmin - 08-06-2017

Just to let everyone know, I'm rolling the cron and backup changes into 4.3 so if you don't want to modify your code, you can have it in the core pretty quickly.




Cron Manager - mudmin - 08-06-2017

Speaking of functions...what is the delete external item stuff about?


Cron Manager - mudmin - 08-06-2017

I did have function reAuth in the us_helpers.php by the way.


Cron Manager - Brandin - 08-06-2017

This is derived from one of my projects:
https://userspice.com/forums/topic/my-us-projects/

The external manager in BOSS to be exact. I made it so I could easily delete between the 6 tables I have. I'm sure there was a built in function for it (deleting that is) but I wanted to make sure it would work without an issue Big Grin


Cron Manager - Brandin - 08-06-2017

@Mudmin RE: reAuth - so it was in there when I had downloaded 002?

Hmm....that's not good!