Cron Jobs not working

Hello dear community,
I have a GL.iNet MUDI router and would like to use cron jobs on it. I've written a script that works fine when I run it manually. Unfortunately, however, nothing happens when it runs via cron.

What could be wrong? I also reset the router beforehand through LUCI.

Thank you for help!!

root@GL-E750:/# ls /usr/share/wlan_shutdown/wlan* -al

-rwxr-xr-x    1 root     root          2176 Oct 24 20:03 /usr/share/wlan_shutdown/wlan_chsk.sh


root@GL-E750:~# /etc/init.d/cron status
running
crontab -e
*/10 * * * *       /usr/share/wlan_shutdown/wlan_check.sh
*/10 * * * *    /usr/share/wginstaller/wg.sh cleanup_wginterfaces

BusyBox v1.35.0 (2023-04-09 12:27:46 UTC) built-in shell (ash)
OpenWrt 22.03.4, r20123-38ccc47687
root@GL-E750:~#

22.03.4 isn't supported by more, you should upgrade.

Fix the script name.

4 Likes

Oh man. How silly can you get? Sorry, with all this tinkering, you end up overlooking the most important thing.

And sorry, I can’t update the version; I'm dependent on GL.iNet's updates here.

You're not, if you switch to vanilla Openwrt.

Problem's already solved, however....

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.