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
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cron Manager
#1
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
  Reply
#2
hmm like the idea of the automated backups Smile
  Reply
#3
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
  Reply
#4
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!
  Reply
#5
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!
  Reply
#6
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.

  Reply
#7
Speaking of functions...what is the delete external item stuff about?
  Reply
#8
I did have function reAuth in the us_helpers.php by the way.
  Reply
#9
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
  Reply
#10
@Mudmin RE: reAuth - so it was in there when I had downloaded 002?

Hmm....that's not good!
  Reply


Forum Jump:


Users browsing this thread: 13 Guest(s)